]> git.sesse.net Git - x264/commitdiff
Use AVMEDIA_TYPE_VIDEO instead of deprecated CODEC_TYPE_VIDEO
authorAnton Khirnov <anton@khirnov.net>
Wed, 20 Apr 2011 08:53:44 +0000 (10:53 +0200)
committerFiona Glaser <fiona@x264.com>
Tue, 26 Apr 2011 05:37:12 +0000 (22:37 -0700)
Fixes build with lavf/lavc 53.

configure
input/lavf.c

index 1a7cb3307ad3e2bccd6ab8a4d96e8cad8276c247..29b6e854d531341676fc7b58c434467634e3c42f 100755 (executable)
--- a/configure
+++ b/configure
@@ -724,15 +724,14 @@ if [ "$lavf" = "auto" ] ; then
     fi
     LAVF_LIBS="-L. $LAVF_LIBS"
     if cc_check libavformat/avformat.h "$LAVF_CFLAGS $LAVF_LIBS" "avcodec_decode_video2(0,0,0,0);" ; then
-        # libvautil/pixdesc.h included the private header intreadwrite.h until r21854
-        if cc_check libavutil/pixdesc.h "$LAVF_CFLAGS $LAVF_LIBS" ; then
+        if cpp_check libavcodec/avcodec.h "$LAVF_CFLAGS $LAVF_LIBS" "LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52,64,0)" ; then
             if [ "$swscale" = "yes" ]; then
                 lavf="yes"
             else
                 echo "Warning: libavformat is not supported without swscale support"
             fi
         else
-            echo "Warning: libavutil is too old, update to ffmpeg r21854+"
+            echo "Warning: libavcodec is too old, update to ffmpeg r22735+"
         fi
     fi
 fi
index 2f26aa9e9eaa45774f3b5f253df58b27d309fd62..185ecfb919fad6d8e3054ee19436fc92e95596ff 100644 (file)
@@ -158,7 +158,7 @@ static int open_file( char *psz_filename, hnd_t *p_handle, video_info_t *info, c
     FAIL_IF_ERROR( av_find_stream_info( h->lavf ) < 0, "could not find input stream info\n" )
 
     int i = 0;
-    while( i < h->lavf->nb_streams && h->lavf->streams[i]->codec->codec_type != CODEC_TYPE_VIDEO )
+    while( i < h->lavf->nb_streams && h->lavf->streams[i]->codec->codec_type != AVMEDIA_TYPE_VIDEO )
         i++;
     FAIL_IF_ERROR( i == h->lavf->nb_streams, "could not find video stream\n" )
     h->stream_id       = i;