deprecate AVCodecContext.sub_id
AymanFekri opened this issue · comments
hello ,
ffmpeg-php wont build because of that error
make output ::
/bin/sh /usr/local/src/ffmpeginstaller.7.4/ffmpeg-php/libtool --mode=compile cc -I. -I/usr/local/src/ffmpeginstaller.7.4/ffmpeg-php -DPHP_ATOM_INC -I/usr/local/src/ffmpeginstaller.7.4/ffmpeg-php/include -I/usr/local/src/ffmpeginstaller.7.4/ffmpeg-php/main -I/usr/local/src/ffmpeginstaller.7.4/ffmpeg-php -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /usr/local/src/ffmpeginstaller.7.4/ffmpeg-php/ffmpeg_movie.c -o ffmpeg_movie.lo
cc -I. -I/usr/local/src/ffmpeginstaller.7.4/ffmpeg-php -DPHP_ATOM_INC -I/usr/local/src/ffmpeginstaller.7.4/ffmpeg-php/include -I/usr/local/src/ffmpeginstaller.7.4/ffmpeg-php/main -I/usr/local/src/ffmpeginstaller.7.4/ffmpeg-php -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /usr/local/src/ffmpeginstaller.7.4/ffmpeg-php/ffmpeg_movie.c -fPIC -DPIC -o .libs/ffmpeg_movie.o
/usr/local/src/ffmpeginstaller.7.4/ffmpeg-php/ffmpeg_movie.c: In function ‘_php_get_codec_name’:
/usr/local/src/ffmpeginstaller.7.4/ffmpeg-php/ffmpeg_movie.c:970: error: ‘AVCodecContext’ has no member named ‘sub_id’
/usr/local/src/ffmpeginstaller.7.4/ffmpeg-php/ffmpeg_movie.c:972: error: ‘AVCodecContext’ has no member named ‘sub_id’
make: *** [ffmpeg_movie.lo] Error 1
ffmpeg-php use old member method "sub_id" which is no longer valid
http://ffmpeg.org/doxygen/trunk/structAVCodecContext.html
. As temporary fix i have comment some line's to force return of mp2 because i cant dig more in code (LAZY :D)
Patch:
--- ffmpeg_movie.c.broken 2013-05-03 23:30:01.659965878 -0400
+++ ffmpeg_movie.c 2013-05-04 06:18:50.932990721 -0400
@@ -967,10 +967,14 @@
if (p) {
codec_name = p->name;
if (decoder_ctx->codec_id == CODEC_ID_MP3) {
+/*
if (decoder_ctx->sub_id == 2)
codec_name = "mp2";
else if (decoder_ctx->sub_id == 1)
codec_name = "mp1";
+*/
-
codec_name = "mp2";
- }
} else if (decoder_ctx->codec_id == CODEC_ID_MPEG2TS) {
/* fake mpeg2 transport stream codec (currently not registered) */
- }
Now ffmpeg-php build .
Thank you
Just commenting it out doesn't seem to be correct solution.
I'll look into it later a bit.
Could you try the patch mentioned above?
It should fix the issue for you.
Tony,
I have the same issue with AVCodecContext.sub_id and I have fixed it with your fix issue #4.
Thanks! :)
Okay, merged the patch.
Thanks!
Thanks, this post helped me.