]> git.sesse.net Git - mlt/commitdiff
fix build on ffmpeg v0.5 (no CODEC_ID_VP8)
authorDan Dennedy <dan@dennedy.org>
Mon, 20 Aug 2012 03:51:52 +0000 (20:51 -0700)
committerDan Dennedy <dan@dennedy.org>
Mon, 20 Aug 2012 03:51:52 +0000 (20:51 -0700)
src/modules/avformat/producer_avformat.c

index ff30ce5869b51085e47047ca36f0ae113653f146..c875d57cb73c544623aa91974ca368468ab0656a 100644 (file)
@@ -1474,7 +1474,11 @@ static int producer_get_image( mlt_frame frame, uint8_t **buffer, mlt_image_form
 
        // Turn on usage of new seek API and PTS for seeking
        int use_pts = self->seekable &&
-               ( codec_context->codec_id == CODEC_ID_H264 || codec_context->codec_id == CODEC_ID_VP8 );
+               ( codec_context->codec_id == CODEC_ID_H264
+#if LIBAVCODEC_VERSION_INT >= ((52<<16)+(68<<8)+2)
+               || codec_context->codec_id == CODEC_ID_VP8
+#endif
+               );
        if ( mlt_properties_get( properties, "use_pts" ) )
                use_pts = mlt_properties_get_int( properties, "use_pts" );
        double delay = mlt_properties_get_double( properties, "video_delay" );