Discussion:
[PATCH] fix ffmpeg compile error
Johannes Weißl
2011-08-29 19:21:56 UTC
Permalink
It seems ffmpeg development is completely mad, although their APIchanges
file says avcodec_open2() is there from version 53.6.0 (and this is true
for the git checkout), they somehow managed to not include it in their
official 0.8.2 release, which has version 53.7.0 (!).
---
ffmpeg.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index d56639a..e884274 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -194,7 +194,7 @@ static int ffmpeg_open(struct input_plugin_data *ip_data)
}

do {
-#if (LIBAVFORMAT_VERSION_INT < ((53<<16)+(3<<8)+0))
+#if (LIBAVFORMAT_VERSION_INT < ((53<<16)+(5<<8)+0))
err = av_find_stream_info(ic);
#else
err = avformat_find_stream_info(ic, NULL);
@@ -229,7 +229,7 @@ static int ffmpeg_open(struct input_plugin_data *ip_data)
if (codec->capabilities & CODEC_CAP_TRUNCATED)
cc->flags |= CODEC_FLAG_TRUNCATED;

-#if (LIBAVCODEC_VERSION_INT < ((53<<16)+(6<<8)+0))
+#if (LIBAVCODEC_VERSION_INT < ((53<<16)+(8<<8)+0))
if (avcodec_open(cc, codec) < 0) {
#else
if (avcodec_open2(cc, codec, NULL) < 0) {
--
1.7.6
Gregory Petrosyan
2011-08-29 19:58:46 UTC
Permalink
Post by Johannes Weißl
It seems ffmpeg development is completely mad, although their APIchanges
file says avcodec_open2() is there from version 53.6.0 (and this is true
for the git checkout), they somehow managed to not include it in their
official 0.8.2 release, which has version 53.7.0 (!).
Wow!

I thought looking at APIchanges is enough to verify Tim's patch -- how naive
:-)

Thanks for the triple-checking -- without your effort, this bug could've been
hidden for a long-long time!

Merged,

Gregory
Johannes Weißl
2011-08-29 21:56:10 UTC
Permalink
Hi Gregory,
Post by Gregory Petrosyan
Post by Johannes Weißl
It seems ffmpeg development is completely mad, although their APIchanges
file says avcodec_open2() is there from version 53.6.0 (and this is true
for the git checkout), they somehow managed to not include it in their
official 0.8.2 release, which has version 53.7.0 (!).
I thought looking at APIchanges is enough to verify Tim's patch -- how naive
:-)
Tim's patch? I thought I was correcting my own patch ;-).
Post by Gregory Petrosyan
Thanks for the triple-checking -- without your effort, this bug
could've been hidden for a long-long time!
Actually, I got hit by that bug just today, because the
debian-multimedia repository upgraded to 0.8.2.


Johannes

Loading...