[FFmpeg-devel] [PATCH] lavf/utils: Fixing skip samples to adhere to side data format

Michael Niedermayer michaelni at gmx.at
Wed Sep 4 21:21:51 CEST 2013


On Wed, Sep 04, 2013 at 10:45:01AM -0700, Vignesh Venkatasubramanian wrote:
> Fixing the skip samples code in utils.c to stick to the specified
> side data format for AV_PKT_DATA_SKIP_SAMPLES. As of now, only the
> first 4 bytes are written to while the next 4 bytes could be junk.
> Setting that to 0.
> 
> Signed-off-by: Vignesh Venkatasubramanian <vigneshv at google.com>
> ---
>  libavformat/utils.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index 763588b..095f263 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -1479,6 +1479,7 @@ return_packet:
>      if (st->skip_samples) {
>          uint8_t *p = av_packet_new_side_data(pkt, AV_PKT_DATA_SKIP_SAMPLES, 10);
>          AV_WL32(p, st->skip_samples);
> +        AV_WL32(p + 4, 0);

fixed differently


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130904/ebb73937/attachment.asc>


More information about the ffmpeg-devel mailing list