Skip to content

ffmpeg_movie.c:918:41: error: ‘CODEC_ID_MPEG2TS’ undeclared #14

Description

@centminmod

Hi I am trying to compile your ffmpeg-php code against a source compiled ffmpeg on CentOS 7.1 using the installer I wrote at https://bitbucket.org/eva2000/ffmpeg-installer/src/d7b8c640e41b4799f70adf60696f1e820261d300/ffmpeg.sh?at=master

ffmpeg installed fine

/opt/bin/ffmpeg -version 
ffmpeg version git-2015-09-11-d5f8a64 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.8.3 (GCC) 20140911 (Red Hat 4.8.3-9)
configuration: --prefix=/opt/ffmpeg --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib --bindir=/opt/bin --pkg-config-flags=--static --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-swscale --enable-shared
libavutil      55.  2.100 / 55.  2.100
libavcodec     57.  1.100 / 57.  1.100
libavformat    57.  0.100 / 57.  0.100
libavdevice    57.  0.100 / 57.  0.100
libavfilter     6.  1.100 /  6.  1.100
libswscale      4.  0.100 /  4.  0.100
libswresample   2.  0.100 /  2.  0.100
libpostproc    54.  0.100 / 54.  0.100

however I am getting errors on make run - full log of errors at https://gist.github.com/centminmod/890e7261d5925066cd77

/bin/sh /svr-setup/ffmpeg-php-git/libtool --mode=compile ccache gcc  -I. -I/svr-setup/ffmpeg-php-git -DPHP_ATOM_INC -I/svr-setup/ffmpeg-php-git/include -I/svr-setup/ffmpeg-php-git/main -I/svr-setup/ffmpeg-php-git -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  -I/opt/ffmpeg/include -DHAVE_CONFIG_H  -g -O2   -c /svr-setup/ffmpeg-php-git/ffmpeg_movie.c -o     ffmpeg_movie.lo 
 ccache gcc -I. -I/svr-setup/ffmpeg-php-git -DPHP_ATOM_INC -I/svr-setup/ffmpeg-php-git/include -I/svr-setup/ffmpeg-php-git/main -I/svr-setup/ffmpeg-php-git -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 -I/opt/ffmpeg/include -DHAVE_CONFIG_H -g -O2 -c /svr-setup/ffmpeg-php-git/ffmpeg_movie.c  -fPIC -DPIC -o .libs/ffmpeg_movie.o
/svr-setup/ffmpeg-php-git/ffmpeg_movie.c: In function ‘_php_get_codec_name’:
/svr-setup/ffmpeg-php-git/ffmpeg_movie.c:918:41: error: ‘CODEC_ID_MPEG2TS’ undeclared (first use in this function)
     } else if (decoder_ctx->codec_id == CODEC_ID_MPEG2TS) {
                                         ^
/svr-setup/ffmpeg-php-git/ffmpeg_movie.c:918:41: note: each undeclared identifier is reported only once for each function it appears in
/svr-setup/ffmpeg-php-git/ffmpeg_movie.c:921:5: warning: ‘codec_name’ is deprecated (declared at /opt/ffmpeg/include/libavcodec/avcodec.h:1483) [-Wdeprecated-declarations]
     } else if (decoder_ctx->codec_name[0] != '\0') {
     ^
/svr-setup/ffmpeg-php-git/ffmpeg_movie.c:922:9: warning: ‘codec_name’ is deprecated (declared at /opt/ffmpeg/include/libavcodec/avcodec.h:1483) [-Wdeprecated-declarations]
         codec_name = decoder_ctx->codec_name;
         ^
/svr-setup/ffmpeg-php-git/ffmpeg_movie.c: In function ‘_php_read_av_frame’:
/svr-setup/ffmpeg-php-git/ffmpeg_movie.c:1171:11: warning: assignment makes pointer from integer without a cast [enabled by default]
     frame = avcodec_alloc_frame();
           ^
/svr-setup/ffmpeg-php-git/ffmpeg_movie.c: In function ‘_php_get_ff_frame’:
/svr-setup/ffmpeg-php-git/ffmpeg_movie.c:1294:28: warning: assignment makes pointer from integer without a cast [enabled by default]
         ff_frame->av_frame = avcodec_alloc_frame();
                            ^
make: *** [ffmpeg_movie.lo] Error 1    

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions