[FFmpeg-devel] Fix coredump when writing trailer to file with no streams added

Michael Niedermayer michaelni
Thu Jun 19 21:55:11 CEST 2008


On Thu, Jun 19, 2008 at 03:51:00PM -0400, Art Clarke wrote:
> On Thu, Jun 19, 2008 at 3:24 PM, Michael Niedermayer <michaelni at gmx.at>
> wrote:
> 
> > On Thu, Jun 19, 2008 at 01:40:06PM -0400, Art Clarke wrote:
> > > Hi there,
> > >
> > > Ffmpeg core-dumps if you do an av_write_header() and then an
> > > av_write_trailer() without first adding at least one stream to the output
> > > file.
> > >
> > > While in theory users should NEVER output a file with no streams in it,
> > > core-dumping seems like the wrong thing to do.  The fix just checks to
> > make
> > > sure there is at least one stream before we start returning cached
> > packets
> > > to write.
> > >
> > > Also attached is a test case file that generates the crash before the
> > fix,
> > > and shows that everything runs smoothly after the fix.
> > >
> > > Please let me know if this passes the bar for a fix, is rejected, or if
> > in
> > > between, what I need to do to fix it up right.
[...]
> >
> > this check can be simplified
> >
> > [...]
> > --
> > Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
[...]
> 
> Fair enough.  Attempt #2.  Same test case applies.

looks ok

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

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- 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/20080619/8701bcff/attachment.pgp>



More information about the ffmpeg-devel mailing list