1 |
aballier 11/12/03 15:58:14 |
2 |
|
3 |
Added: ffmpeg08.patch |
4 |
Log: |
5 |
fix build with ffmpeg 0.8, bug #392695 |
6 |
|
7 |
(Portage version: 2.2.0_alpha79/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 media-video/motion/files/ffmpeg08.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/motion/files/ffmpeg08.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/motion/files/ffmpeg08.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: ffmpeg08.patch |
16 |
=================================================================== |
17 |
Index: motion-3.2.12/ffmpeg.c |
18 |
=================================================================== |
19 |
--- motion-3.2.12.orig/ffmpeg.c |
20 |
+++ motion-3.2.12/ffmpeg.c |
21 |
@@ -60,6 +60,10 @@ |
22 |
*/ |
23 |
#define APPEND_PROTO "appfile" |
24 |
|
25 |
+#ifndef guess_format |
26 |
+#define guess_format av_guess_format |
27 |
+#endif |
28 |
+ |
29 |
/* Some forward-declarations. */ |
30 |
void ffmpeg_put_frame(struct ffmpeg *, AVFrame *); |
31 |
void ffmpeg_cleanups(struct ffmpeg *); |
32 |
@@ -228,7 +232,9 @@ void ffmpeg_init() |
33 |
mpeg1_file_protocol.url_close = file_protocol.url_close; |
34 |
|
35 |
/* Register the append file protocol. */ |
36 |
-#if LIBAVFORMAT_BUILD >= (52<<16 | 31<<8) |
37 |
+#if LIBAVFORMAT_BUILD >= (53<<16 ) |
38 |
+ av_register_protocol2(&mpeg1_file_protocol, sizeof(mpeg1_file_protocol)); |
39 |
+#elif LIBAVFORMAT_BUILD >= (52<<16 | 31<<8) |
40 |
av_register_protocol(&mpeg1_file_protocol); |
41 |
#else |
42 |
register_protocol(&mpeg1_file_protocol); |
43 |
@@ -377,7 +383,7 @@ struct ffmpeg *ffmpeg_open(char *ffmpeg_ |
44 |
|
45 |
ffmpeg->c = c = AVSTREAM_CODEC_PTR(ffmpeg->video_st); |
46 |
c->codec_id = ffmpeg->oc->oformat->video_codec; |
47 |
- c->codec_type = CODEC_TYPE_VIDEO; |
48 |
+ c->codec_type = AVMEDIA_TYPE_VIDEO; |
49 |
is_mpeg1 = c->codec_id == CODEC_ID_MPEG1VIDEO; |
50 |
|
51 |
if (strcmp(ffmpeg_video_codec, "ffv1") == 0) |
52 |
@@ -646,7 +652,7 @@ void ffmpeg_put_frame(struct ffmpeg *ffm |
53 |
if (ffmpeg->oc->oformat->flags & AVFMT_RAWPICTURE) { |
54 |
/* raw video case. The API will change slightly in the near future for that */ |
55 |
#ifdef FFMPEG_AVWRITEFRAME_NEWAPI |
56 |
- pkt.flags |= PKT_FLAG_KEY; |
57 |
+ pkt.flags |= AV_PKT_FLAG_KEY; |
58 |
pkt.data = (uint8_t *)pic; |
59 |
pkt.size = sizeof(AVPicture); |
60 |
ret = av_write_frame(ffmpeg->oc, &pkt); |
61 |
@@ -667,7 +673,7 @@ void ffmpeg_put_frame(struct ffmpeg *ffm |
62 |
#ifdef FFMPEG_AVWRITEFRAME_NEWAPI |
63 |
pkt.pts = AVSTREAM_CODEC_PTR(ffmpeg->video_st)->coded_frame->pts; |
64 |
if (AVSTREAM_CODEC_PTR(ffmpeg->video_st)->coded_frame->key_frame) { |
65 |
- pkt.flags |= PKT_FLAG_KEY; |
66 |
+ pkt.flags |= AV_PKT_FLAG_KEY; |
67 |
} |
68 |
pkt.data = ffmpeg->video_outbuf; |
69 |
pkt.size = out_size; |