// 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" );