[FFmpeg-devel] [PATCH] make packet_size in AVFormatContext unsigned

Michael Niedermayer michaelni
Wed Jun 17 21:21:16 CEST 2009


On Wed, Jun 17, 2009 at 03:08:04PM -0400, Ronald S. Bultje wrote:
> Hi,
> 
> On Wed, Jun 17, 2009 at 2:24 PM, Michael Niedermayer <michaelni at gmx.at>wrote:
> 
> > On Wed, Jun 17, 2009 at 09:45:01AM -0400, Ronald S. Bultje wrote:
> >
> [..
> > so the max buffer size, and thus the max size of the packet data, should
> fit
> > 10+13 bytes, i.e. 1<<23 = 8MB (ok, ok, +10 bytes for the packet header).
> Am
> > I close here? Then the minimum size required is the size of the packet
> > header, i.e. 10 bytes, and mpegenc.c makes assumptions that it is at least
> > 10 bytes more than this, so 20 bytes.
> >
> > Attached patch OK?
> 
> probably, and even if not the packet size limits are not going to be an
> > issue in practice, so ok
> 
> 
> (I'd say that most demuxers I've seen won't even deal with multi-MB MPEG
> packets, too high a chance that it's just a bunch of random bytes, but that
> would then be a demuxer bug again.)
> 
> Anyway, applied. Thanks for the lesson. :-). Can I make packet_size unsigned
> now? Looks safe to me.

if you are certain its safe and checked all code, 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: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090617/073b4cd7/attachment.pgp>



More information about the ffmpeg-devel mailing list