diff --git a/ext/libav/gstavdemux.c b/ext/libav/gstavdemux.c index 21b46aa48e..80a0920f14 100644 --- a/ext/libav/gstavdemux.c +++ b/ext/libav/gstavdemux.c @@ -483,7 +483,11 @@ gst_ffmpegdemux_do_seek (GstFFMpegDemux * demux, GstSegment * segment) GST_LOG_OBJECT (demux, "keyframeidx: %d", keyframeidx); if (keyframeidx >= 0) { +#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(58,78,0) + fftarget = avformat_index_get_entry (stream, keyframeidx)->timestamp; +#else fftarget = stream->index_entries[keyframeidx].timestamp; +#endif target = gst_ffmpeg_time_ff_to_gst (fftarget, stream->time_base); GST_LOG_OBJECT (demux,