[FFmpeg-cvslog] lavc: Adding seek_preroll to AVCodecContext

Vignesh Venkatasubramanian git at videolan.org
Mon Oct 14 18:54:14 CEST 2013


ffmpeg | branch: master | Vignesh Venkatasubramanian <vigneshv at google.com> | Mon Oct 14 07:41:16 2013 -0700| [0f99aad80f656c1bb0fca8034f17447dfc7a1876] | committer: Michael Niedermayer

lavc: Adding seek_preroll to AVCodecContext

seek_preroll field is added to the AVCodecContext struct. It indicates
the number of samples to be discarded whenever there is a discontinuity.
The minor version is bumped accordingly.

Signed-off-by: Vignesh Venkatasubramanian <vigneshv at google.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/avcodec.h |   10 ++++++++++
 libavcodec/utils.c   |    1 +
 libavcodec/version.h |    2 +-
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 0b23b64..b64331d 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2882,6 +2882,13 @@ typedef struct AVCodecContext {
      * - encoding: unused
      */
     int skip_alpha;
+
+    /**
+     * Number of samples to skip after a discontinuity
+     * - decoding: unused
+     * - encoding: set by libavcodec
+     */
+    int seek_preroll;
 } AVCodecContext;
 
 AVRational av_codec_get_pkt_timebase         (const AVCodecContext *avctx);
@@ -2893,6 +2900,9 @@ void                     av_codec_set_codec_descriptor(AVCodecContext *avctx, co
 int  av_codec_get_lowres(const AVCodecContext *avctx);
 void av_codec_set_lowres(AVCodecContext *avctx, int val);
 
+int  av_codec_get_seek_preroll(const AVCodecContext *avctx);
+void av_codec_set_seek_preroll(AVCodecContext *avctx, int val);
+
 /**
  * AVProfile.
  */
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 20de48e..3832b81 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1044,6 +1044,7 @@ void avcodec_free_frame(AVFrame **frame)
 MAKE_ACCESSORS(AVCodecContext, codec, AVRational, pkt_timebase)
 MAKE_ACCESSORS(AVCodecContext, codec, const AVCodecDescriptor *, codec_descriptor)
 MAKE_ACCESSORS(AVCodecContext, codec, int, lowres)
+MAKE_ACCESSORS(AVCodecContext, codec, int, seek_preroll)
 
 int av_codec_get_max_lowres(const AVCodec *codec)
 {
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 63a2d8f..c540c27 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,7 +29,7 @@
 #include "libavutil/avutil.h"
 
 #define LIBAVCODEC_VERSION_MAJOR 55
-#define LIBAVCODEC_VERSION_MINOR  35
+#define LIBAVCODEC_VERSION_MINOR  36
 #define LIBAVCODEC_VERSION_MICRO 100
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \



More information about the ffmpeg-cvslog mailing list