avdemux: fix build with FFmpeg 4.4

Direct access to avstream->index_entries was removed
in favour of the newly added avformat_index_get_entry()
and friends.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-libav/-/issues/85

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-libav/-/merge_requests/127>
This commit is contained in:
Tim-Philipp Müller 2021-04-13 01:07:15 +01:00
parent ad7f7c87f0
commit 07b43c727c

View file

@ -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,