[FFmpeg-devel] [PATCH] Avoid divide by zero in compute_avg_bitrate()

Michael Niedermayer michaelni at gmx.at
Fri May 13 13:37:43 CEST 2011

On Thu, May 12, 2011 at 05:12:23PM -0700, Baptiste Coudurier wrote:
> Hi Tomas,
> On 05/11/2011 05:25 AM, Tomas Härdin wrote:
> > Hi
> > 
> > The attached patch fixes a possibility for movenc.c to SIGFPE if
> > trackDuration is zero when writing esds. This can happen if the user
> > manages to mux a single AAC packet with dts = 0 and duration = 0.
> How did you manage to have pkt->duration == 0 ?
> frame_size should be set for aac therefore I think pkt->duration cannot
> be 0.

maybe we should add a assert(pkt->duration>0 && frame_size)
somewhere then

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/20110513/413fe2d5/attachment.asc>

More information about the ffmpeg-devel mailing list