[FFmpeg-devel] [PATCH] riff: chunks must be at 2 byte boundary

Michael Niedermayer michaelni at gmx.at
Fri Feb 8 02:01:22 CET 2013


On Thu, Feb 07, 2013 at 10:04:43AM +0000, Paul B Mahol wrote:
> Fixes #2244.
> 
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
>  libavformat/riff.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/libavformat/riff.c b/libavformat/riff.c
> index 0df5c8c..3011f8d 100644
> --- a/libavformat/riff.c
> +++ b/libavformat/riff.c
> @@ -428,9 +428,10 @@ void ff_end_tag(AVIOContext *pb, int64_t start)
>      int64_t pos;
>  
>      pos = avio_tell(pb);
> +    ffio_fill(pb, 0, pos & 1);
>      avio_seek(pb, start - 4, SEEK_SET);
>      avio_wl32(pb, (uint32_t)(pos - start));
> -    avio_seek(pb, pos, SEEK_SET);
> +    avio_seek(pb, FFALIGN(pos, 2), SEEK_SET);
>  }

ff_end_tag is used in several places i dont know if this is correct in
all, but for the case where its shown to have beenwrong its of course
ok

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

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- 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/20130208/82bf0510/attachment.asc>


More information about the ffmpeg-devel mailing list