[FFmpeg-devel] [PATCH] asf*.c/h: use AVFormatContext->packet_size instead of own copy
Ronald S. Bultje
rsbultje
Wed Apr 22 15:20:15 CEST 2009
Hi,
On Wed, Apr 22, 2009 at 9:07 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> your patch probably introduces sec holes or at least bugs due to
> signedness change.
Indeed possible sechole, attached is a minimal change to fix that
(asfenc.c is unaffected because it always sets it to 3200)...
Ronald
-------------- next part --------------
Index: ffmpeg-svn/libavformat/asfdec.c
===================================================================
--- ffmpeg-svn.orig/libavformat/asfdec.c 2009-04-22 08:57:03.000000000 -0400
+++ ffmpeg-svn/libavformat/asfdec.c 2009-04-22 09:18:35.000000000 -0400
@@ -217,7 +217,8 @@
asf->hdr.min_pktsize = get_le32(pb);
asf->hdr.max_pktsize = get_le32(pb);
asf->hdr.max_bitrate = get_le32(pb);
- s->packet_size = asf->hdr.max_pktsize;
+ if ((s->packet_size = asf->hdr.max_pktsize) < 0)
+ return -1;
} else if (!guidcmp(&g, &ff_asf_stream_header)) {
enum CodecType type;
int type_specific_size, sizeX;
More information about the ffmpeg-devel
mailing list