summaryrefslogtreecommitdiff
path: root/ffmpeg10.patch
blob: b72ceb176b83cd0655e03dcf7746af65dea565fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
commit 1a6470a0344e61c9561a637e370eb36bb0daf2d3
Author: Dan Dennedy <dan@dennedy.org>
Date:   Wed Sep 19 10:02:28 2012 -0700

    fix build due to removal of deprecated encode() from AVCodec

diff --git a/src/modules/avformat/consumer_avformat.c b/src/modules/avformat/consumer_avformat.c
index 4b0896d..640e2b0 100644
--- a/src/modules/avformat/consumer_avformat.c
+++ b/src/modules/avformat/consumer_avformat.c
@@ -237,7 +237,9 @@ static int consumer_start( mlt_consumer consumer )
 		mlt_properties_set_data( properties, "acodec", codecs, 0, (mlt_destructor) mlt_properties_close, NULL );
 		mlt_properties_set_data( doc, "audio_codecs", codecs, 0, NULL, NULL );
 		while ( ( codec = av_codec_next( codec ) ) )
-#if LIBAVCODEC_VERSION_INT >= ((54<<16)+(0<<8)+0)
+#if LIBAVCODEC_VERSION_INT >= ((54<<16)+(56<<8)+100)
+			if ( codec->encode2 && codec->type == CODEC_TYPE_AUDIO )
+#elif LIBAVCODEC_VERSION_INT >= ((54<<16)+(0<<8)+0)
 			if ( ( codec->encode || codec->encode2 ) && codec->type == CODEC_TYPE_AUDIO )
 #else
 			if ( codec->encode && codec->type == CODEC_TYPE_AUDIO )
@@ -261,7 +263,9 @@ static int consumer_start( mlt_consumer consumer )
 		mlt_properties_set_data( properties, "vcodec", codecs, 0, (mlt_destructor) mlt_properties_close, NULL );
 		mlt_properties_set_data( doc, "video_codecs", codecs, 0, NULL, NULL );
 		while ( ( codec = av_codec_next( codec ) ) )
-#if LIBAVCODEC_VERSION_INT >= ((54<<16)+(0<<8)+0)
+#if LIBAVCODEC_VERSION_INT >= ((54<<16)+(56<<8)+100)
+			if ( codec->encode2 && codec->type == CODEC_TYPE_VIDEO )
+#elif LIBAVCODEC_VERSION_INT >= ((54<<16)+(0<<8)+0)
 			if ( (codec->encode || codec->encode2) && codec->type == CODEC_TYPE_VIDEO )
 #else
 			if ( codec->encode && codec->type == CODEC_TYPE_VIDEO )
commit a5f11c2ad1d4aab20a0b69ff167bded6455ced81
Author: Dan Dennedy <dan@dennedy.org>
Date:   Sun Sep 23 16:39:25 2012 -0700

    fix build against libav master

diff --git a/src/modules/avformat/consumer_avformat.c b/src/modules/avformat/consumer_avformat.c
index 640e2b0..da7f7af 100644
--- a/src/modules/avformat/consumer_avformat.c
+++ b/src/modules/avformat/consumer_avformat.c
@@ -237,7 +237,7 @@ static int consumer_start( mlt_consumer consumer )
 		mlt_properties_set_data( properties, "acodec", codecs, 0, (mlt_destructor) mlt_properties_close, NULL );
 		mlt_properties_set_data( doc, "audio_codecs", codecs, 0, NULL, NULL );
 		while ( ( codec = av_codec_next( codec ) ) )
-#if LIBAVCODEC_VERSION_INT >= ((54<<16)+(56<<8)+100)
+#if (defined(FFUDIV) && LIBAVCODEC_VERSION_INT >= ((54<<16)+(56<<8)+100)) || (LIBAVCODEC_VERSION_INT >= ((54<<16)+(27<<8)+0))
 			if ( codec->encode2 && codec->type == CODEC_TYPE_AUDIO )
 #elif LIBAVCODEC_VERSION_INT >= ((54<<16)+(0<<8)+0)
 			if ( ( codec->encode || codec->encode2 ) && codec->type == CODEC_TYPE_AUDIO )
@@ -263,7 +263,7 @@ static int consumer_start( mlt_consumer consumer )
 		mlt_properties_set_data( properties, "vcodec", codecs, 0, (mlt_destructor) mlt_properties_close, NULL );
 		mlt_properties_set_data( doc, "video_codecs", codecs, 0, NULL, NULL );
 		while ( ( codec = av_codec_next( codec ) ) )
-#if LIBAVCODEC_VERSION_INT >= ((54<<16)+(56<<8)+100)
+#if (defined(FFUDIV) && LIBAVCODEC_VERSION_INT >= ((54<<16)+(56<<8)+100)) || (LIBAVCODEC_VERSION_INT >= ((54<<16)+(27<<8)+0))
 			if ( codec->encode2 && codec->type == CODEC_TYPE_VIDEO )
 #elif LIBAVCODEC_VERSION_INT >= ((54<<16)+(0<<8)+0)
 			if ( (codec->encode || codec->encode2) && codec->type == CODEC_TYPE_VIDEO )