From: Aman Gupta <[email protected]> Currently only flv and asf decoders attempt to use pb->read_seek, by calling avio_read_seek() expliclity.
This change allows avformat users to specify a custom AVIOContext with a read_seek callback, and have it be used with any format whenever av_seek_frame() is invoked. Signed-off-by: Aman Gupta <[email protected]> --- libavformat/utils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/utils.c b/libavformat/utils.c index 9b3f0d28e6..b38727b3ed 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2487,6 +2487,9 @@ static int seek_frame_internal(AVFormatContext *s, int stream_index, if (s->iformat->read_seek) { ff_read_frame_flush(s); ret = s->iformat->read_seek(s, stream_index, timestamp, flags); + } else if (s->pb->read_seek) { + ff_read_frame_flush(s); + ret = s->pb->read_seek(s->pb->opaque, stream_index, timestamp, flags); } else ret = -1; if (ret >= 0) -- 2.20.1 _______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
