[FFmpeg-devel] [PATCH 1/3] lavf: Adding seek_preroll field to AVStream

Vignesh Venkatasubramanian vigneshv at google.com
Tue Sep 24 19:30:58 CEST 2013


Adding seek_preroll field to AVStream. This field will contain the number of
samples to be dropped after a discontinuity.

Signed-off-by: Vignesh Venkatasubramanian <vigneshv at google.com>
---
 libavformat/avformat.h | 11 +++++++++++
 libavformat/version.h  |  4 ++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index b18eb3f..030c2c7 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -888,10 +888,21 @@ typedef struct AVStream {
      */
     int pts_wrap_behavior;
 
+    /**
+     * Number of samples to skip after a discontinuity. For example, when a seek
+     * happens.
+     *
+     * Code outside avformat should access this field using:
+     * av_stream_get/set_seek_preroll(stream)
+     */
+    int seek_preroll;
+
 } AVStream;
 
 AVRational av_stream_get_r_frame_rate(const AVStream *s);
 void       av_stream_set_r_frame_rate(AVStream *s, AVRational r);
+int  av_stream_get_seek_preroll(const AVStream *s);
+void av_stream_set_seek_preroll(AVStream *s, int seek_preroll);
 
 #define AV_PROGRAM_RUNNING 1
 
diff --git a/libavformat/version.h b/libavformat/version.h
index c224232..32e76c7 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -30,8 +30,8 @@
 #include "libavutil/avutil.h"
 
 #define LIBAVFORMAT_VERSION_MAJOR 55
-#define LIBAVFORMAT_VERSION_MINOR 18
-#define LIBAVFORMAT_VERSION_MICRO 102
+#define LIBAVFORMAT_VERSION_MINOR 19
+#define LIBAVFORMAT_VERSION_MICRO 100
 
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
                                                LIBAVFORMAT_VERSION_MINOR, \
-- 
1.8.4



More information about the ffmpeg-devel mailing list