lavc: Add seek_preroll to AVCodecParameters
authorJames Almer <jamrial@gmail.com>
Fri, 4 Mar 2016 18:51:41 +0000 (15:51 -0300)
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>
Thu, 31 Mar 2016 20:20:39 +0000 (21:20 +0100)
Signed-off-by: James Almer <jamrial@gmail.com>
libavcodec/avcodec.h
libavcodec/utils.c

index 0d37083..4e8d30c 100644 (file)
@@ -3904,6 +3904,10 @@ typedef struct AVCodecParameters {
      * audio without any trailing padding.
      */
     int trailing_padding;
+    /**
+     * Audio only. Number of samples to skip after a discontinuity.
+     */
+    int seek_preroll;
 } AVCodecParameters;
 
 /**
index d38e2f9..55a1379 100644 (file)
@@ -3784,6 +3784,7 @@ int avcodec_parameters_from_context(AVCodecParameters *par,
         par->sample_rate     = codec->sample_rate;
         par->block_align     = codec->block_align;
         par->initial_padding = codec->initial_padding;
+        par->seek_preroll    = codec->seek_preroll;
         break;
     }
 
@@ -3830,6 +3831,7 @@ int avcodec_parameters_to_context(AVCodecContext *codec,
         codec->sample_rate     = par->sample_rate;
         codec->block_align     = par->block_align;
         codec->initial_padding = par->initial_padding;
+        codec->seek_preroll    = par->seek_preroll;
         break;
     }