[FFmpeg-cvslog] lavf/aviobuf: make AVSEEK_SIZE usable from outside.

Nicolas George git at videolan.org
Tue Aug 13 17:39:53 EEST 2019


ffmpeg | branch: master | Nicolas George <george at nsup.org> | Fri Jul 19 14:21:49 2019 +0200| [6e1a2dc11236fb04acf35bde647872eb4f3ded9c] | committer: Nicolas George

lavf/aviobuf: make AVSEEK_SIZE usable from outside.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6e1a2dc11236fb04acf35bde647872eb4f3ded9c
---

 libavformat/aviobuf.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 2d011027c9..c76df714ad 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -255,6 +255,9 @@ int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
     if(!s)
         return AVERROR(EINVAL);
 
+    if ((whence & AVSEEK_SIZE))
+        return s->seek ? s->seek(s->opaque, offset, AVSEEK_SIZE) : AVERROR(ENOSYS);
+
     buffer_size = s->buf_end - s->buffer;
     // pos is the absolute position that the beginning of s->buffer corresponds to in the file
     pos = s->pos - (s->write_flag ? 0 : buffer_size);



More information about the ffmpeg-cvslog mailing list