[FFmpeg-cvslog] lavf: filter out AVSEEK_FLAG_BACKWARD in new API.

Nicolas George git at videolan.org
Sat May 4 17:11:28 CEST 2013


ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Fri May  3 10:31:33 2013 +0200| [3fc66dfef22c044d1bbe36d0739441205bd99923] | committer: Nicolas George

lavf: filter out AVSEEK_FLAG_BACKWARD in new API.

Also document that it has no effect.

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

 libavformat/avformat.h |    1 +
 libavformat/utils.c    |    1 +
 2 files changed, 2 insertions(+)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index f21dd90..a9ea1d8 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1687,6 +1687,7 @@ int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp,
  * or if stream_index is -1, in AV_TIME_BASE units.
  * If flags contain AVSEEK_FLAG_ANY, then non-keyframes are treated as
  * keyframes (this may not be supported by all demuxers).
+ * If flags contain AVSEEK_FLAG_BACKWARD, it is ignored.
  *
  * @param stream_index index of the stream which is used as time base reference
  * @param min_ts smallest acceptable timestamp
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 29f4c1d..33b3e75 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2164,6 +2164,7 @@ int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int
 
     if(s->seek2any>0)
         flags |= AVSEEK_FLAG_ANY;
+    flags &= ~AVSEEK_FLAG_BACKWARD;
 
     if (s->iformat->read_seek2) {
         int ret;



More information about the ffmpeg-cvslog mailing list