[FFmpeg-devel] [PATCH 4/6] lavu/frame: add AV_FRAME_DATA_SKIP_SAMPLES.

wm4 nfxjfg at googlemail.com
Sun Mar 2 21:45:22 CET 2014


On Fri, 21 Feb 2014 20:50:16 +0100
Nicolas George <george at nsup.org> wrote:

> From: Nicolas George <nicolas.george at normalesup.org>
> 
> Signed-off-by: Nicolas George <george at nsup.org>
> ---
>  libavutil/frame.h | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/libavutil/frame.h b/libavutil/frame.h
> index 5f82f17..10ee32d 100644
> --- a/libavutil/frame.h
> +++ b/libavutil/frame.h
> @@ -92,6 +92,17 @@ enum AVFrameSideDataType {
>       * The data is the AVDownmixInfo struct defined in libavutil/downmix_info.h.
>       */
>      AV_FRAME_DATA_DOWNMIX_INFO,
> +
> +    /**
> +     * Recommmends skipping the specified number of samples
> +     * @code
> +     * u32le number of samples to skip from start of this packet
> +     * u32le number of samples to skip from end of this packet
> +     * u8    reason for start skip
> +     * u8    reason for end   skip (0=padding silence, 1=convergence)
> +     * @endcode
> +     */
> +    AV_FRAME_DATA_SKIP_SAMPLES = MKTAG('S','K','I','P'),
>  };
>  
>  typedef struct AVFrameSideData {

I like this approach. It could be used for audio codecs with
preroll/padding too, instead of forcing the user to allow libavcodec to
mess with the timestamps directly.


More information about the ffmpeg-devel mailing list