]>
Commit | Line | Data |
---|---|---|
e47a8236 JR |
1 | commit 1a6470a0344e61c9561a637e370eb36bb0daf2d3 |
2 | Author: Dan Dennedy <dan@dennedy.org> | |
3 | Date: Wed Sep 19 10:02:28 2012 -0700 | |
4 | ||
5 | fix build due to removal of deprecated encode() from AVCodec | |
6 | ||
7 | diff --git a/src/modules/avformat/consumer_avformat.c b/src/modules/avformat/consumer_avformat.c | |
8 | index 4b0896d..640e2b0 100644 | |
9 | --- a/src/modules/avformat/consumer_avformat.c | |
10 | +++ b/src/modules/avformat/consumer_avformat.c | |
11 | @@ -237,7 +237,9 @@ static int consumer_start( mlt_consumer consumer ) | |
12 | mlt_properties_set_data( properties, "acodec", codecs, 0, (mlt_destructor) mlt_properties_close, NULL ); | |
13 | mlt_properties_set_data( doc, "audio_codecs", codecs, 0, NULL, NULL ); | |
14 | while ( ( codec = av_codec_next( codec ) ) ) | |
15 | -#if LIBAVCODEC_VERSION_INT >= ((54<<16)+(0<<8)+0) | |
16 | +#if LIBAVCODEC_VERSION_INT >= ((54<<16)+(56<<8)+100) | |
17 | + if ( codec->encode2 && codec->type == CODEC_TYPE_AUDIO ) | |
18 | +#elif LIBAVCODEC_VERSION_INT >= ((54<<16)+(0<<8)+0) | |
19 | if ( ( codec->encode || codec->encode2 ) && codec->type == CODEC_TYPE_AUDIO ) | |
20 | #else | |
21 | if ( codec->encode && codec->type == CODEC_TYPE_AUDIO ) | |
22 | @@ -261,7 +263,9 @@ static int consumer_start( mlt_consumer consumer ) | |
23 | mlt_properties_set_data( properties, "vcodec", codecs, 0, (mlt_destructor) mlt_properties_close, NULL ); | |
24 | mlt_properties_set_data( doc, "video_codecs", codecs, 0, NULL, NULL ); | |
25 | while ( ( codec = av_codec_next( codec ) ) ) | |
26 | -#if LIBAVCODEC_VERSION_INT >= ((54<<16)+(0<<8)+0) | |
27 | +#if LIBAVCODEC_VERSION_INT >= ((54<<16)+(56<<8)+100) | |
28 | + if ( codec->encode2 && codec->type == CODEC_TYPE_VIDEO ) | |
29 | +#elif LIBAVCODEC_VERSION_INT >= ((54<<16)+(0<<8)+0) | |
30 | if ( (codec->encode || codec->encode2) && codec->type == CODEC_TYPE_VIDEO ) | |
31 | #else | |
32 | if ( codec->encode && codec->type == CODEC_TYPE_VIDEO ) | |
33 | commit a5f11c2ad1d4aab20a0b69ff167bded6455ced81 | |
34 | Author: Dan Dennedy <dan@dennedy.org> | |
35 | Date: Sun Sep 23 16:39:25 2012 -0700 | |
36 | ||
37 | fix build against libav master | |
38 | ||
39 | diff --git a/src/modules/avformat/consumer_avformat.c b/src/modules/avformat/consumer_avformat.c | |
40 | index 640e2b0..da7f7af 100644 | |
41 | --- a/src/modules/avformat/consumer_avformat.c | |
42 | +++ b/src/modules/avformat/consumer_avformat.c | |
43 | @@ -237,7 +237,7 @@ static int consumer_start( mlt_consumer consumer ) | |
44 | mlt_properties_set_data( properties, "acodec", codecs, 0, (mlt_destructor) mlt_properties_close, NULL ); | |
45 | mlt_properties_set_data( doc, "audio_codecs", codecs, 0, NULL, NULL ); | |
46 | while ( ( codec = av_codec_next( codec ) ) ) | |
47 | -#if LIBAVCODEC_VERSION_INT >= ((54<<16)+(56<<8)+100) | |
48 | +#if (defined(FFUDIV) && LIBAVCODEC_VERSION_INT >= ((54<<16)+(56<<8)+100)) || (LIBAVCODEC_VERSION_INT >= ((54<<16)+(27<<8)+0)) | |
49 | if ( codec->encode2 && codec->type == CODEC_TYPE_AUDIO ) | |
50 | #elif LIBAVCODEC_VERSION_INT >= ((54<<16)+(0<<8)+0) | |
51 | if ( ( codec->encode || codec->encode2 ) && codec->type == CODEC_TYPE_AUDIO ) | |
52 | @@ -263,7 +263,7 @@ static int consumer_start( mlt_consumer consumer ) | |
53 | mlt_properties_set_data( properties, "vcodec", codecs, 0, (mlt_destructor) mlt_properties_close, NULL ); | |
54 | mlt_properties_set_data( doc, "video_codecs", codecs, 0, NULL, NULL ); | |
55 | while ( ( codec = av_codec_next( codec ) ) ) | |
56 | -#if LIBAVCODEC_VERSION_INT >= ((54<<16)+(56<<8)+100) | |
57 | +#if (defined(FFUDIV) && LIBAVCODEC_VERSION_INT >= ((54<<16)+(56<<8)+100)) || (LIBAVCODEC_VERSION_INT >= ((54<<16)+(27<<8)+0)) | |
58 | if ( codec->encode2 && codec->type == CODEC_TYPE_VIDEO ) | |
59 | #elif LIBAVCODEC_VERSION_INT >= ((54<<16)+(0<<8)+0) | |
60 | if ( (codec->encode || codec->encode2) && codec->type == CODEC_TYPE_VIDEO ) |