Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0.6 won't compile with recent ffmpeg due to changes in avcodec.h #84

Closed
GoogleCodeExporter opened this issue Mar 15, 2015 · 10 comments
Closed

Comments

@GoogleCodeExporter
Copy link

I am having problems with today's snapshot of ffmpeg. (2011-05-05). 

ffmpegthumbnailer-2.0.6 won't compile with : 


/bin/sh ./libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.      
-I/usr/include/libpng12   -D__STDC_CONSTANT_MACROS -MT 
libffmpegthumbnailer_la-moviedecoder.lo -MD -MP -MF 
.deps/libffmpegthumbnailer_la-moviedecoder.Tpo -c -o 
libffmpegthumbnailer_la-moviedecoder.lo `test -f 
'libffmpegthumbnailer/moviedecoder.cpp' || echo 
'./'`libffmpegthumbnailer/moviedecoder.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I/usr/include/libpng12 
-D__STDC_CONSTANT_MACROS -MT libffmpegthumbnailer_la-moviedecoder.lo -MD -MP 
-MF .deps/libffmpegthumbnailer_la-moviedecoder.Tpo -c 
libffmpegthumbnailer/moviedecoder.cpp  -fPIC -DPIC -o 
.libs/libffmpegthumbnailer_la-moviedecoder.o
libffmpegthumbnailer/moviedecoder.cpp: In member function 'void 
ffmpegthumbnailer::MovieDecoder::initializeVideo()':
libffmpegthumbnailer/moviedecoder.cpp:130: error: 'CODEC_TYPE_VIDEO' was not 
declared in this scope
make[2]: *** [libffmpegthumbnailer_la-moviedecoder.lo] Error 1
make[2]: Leaving directory `/root/61/ffmpegthumbnailer-2.0.6'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/61/ffmpegthumbnailer-2.0.6'
make: *** [all] Error 2

The last ffmpeg snapshot I built against was 2011-03-09 and 
ffmpegthumbnailer-2.0.2 and it worked. If I downgrade to ffmpeg-2011-03-09 
again, 2.0.6 builds just fine. 

Upon further investigation I found in ffmpeg-2011-03-09, avcodec.h : 

#if LIBAVCODEC_VERSION_MAJOR < 53
#define CodecType AVMediaType

#define CODEC_TYPE_UNKNOWN    AVMEDIA_TYPE_UNKNOWN
#define CODEC_TYPE_VIDEO      AVMEDIA_TYPE_VIDEO
#define CODEC_TYPE_AUDIO      AVMEDIA_TYPE_AUDIO
#define CODEC_TYPE_DATA       AVMEDIA_TYPE_DATA
#define CODEC_TYPE_SUBTITLE   AVMEDIA_TYPE_SUBTITLE
#define CODEC_TYPE_ATTACHMENT AVMEDIA_TYPE_ATTACHMENT
#define CODEC_TYPE_NB         AVMEDIA_TYPE_NB
#endif 

Which is no longer present in ffmpeg-2011-05-05... 

Original issue reported on code.google.com by andrixnet on 5 May 2011 at 1:26

@GoogleCodeExporter
Copy link
Author

Here is patch file to compile it without this error

Original comment by heimsasc...@gmail.com on 10 Jun 2011 at 7:17

Attachments:

@GoogleCodeExporter
Copy link
Author

Should be included in the next release. 

Thank you. 

Original comment by andrixnet on 27 Jun 2011 at 5:37

@GoogleCodeExporter
Copy link
Author

Please verify that the trunk works

Original comment by dirk.vdb on 30 Jun 2011 at 4:59

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

I compiled version 2.0.6, applying the attached patch. Worked like charm. 

Original comment by andrixnet on 30 Jun 2011 at 6:00

@GoogleCodeExporter
Copy link
Author

The patch above is not correct, it breaks compiling with older versions. I 
implemented a different fix in subversion.

Original comment by dirk.vdb on 30 Jun 2011 at 6:11

@GoogleCodeExporter
Copy link
Author

The change made in r234 changes CODEC_TYPE_VIDEO to AVMEDIA_TYPE_AUDIO. That 
does not seem correct.

Original comment by floppymaster@gmail.com on 23 Jul 2011 at 6:41

@GoogleCodeExporter
Copy link
Author

You are completely correct, my mistake. I fixed this. Can you verify if it 
works now, than I will create a new release.

Original comment by dirk.vdb on 24 Jul 2011 at 10:03

@GoogleCodeExporter
Copy link
Author

r235 works for me with ffmpeg-0.8 (libavcodec 53.7.0).

Original comment by floppymaster@gmail.com on 24 Jul 2011 at 3:58

@GoogleCodeExporter
Copy link
Author

Thanks vor verifying, release 2.0.7 has been released

Original comment by dirk.vdb on 24 Jul 2011 at 4:37

@GoogleCodeExporter
Copy link
Author

Original comment by dirk.vdb on 24 Jul 2011 at 4:37

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant