[Ffmpeg-devel] [PATCH] CRYO APC demuxer

Michael Niedermayer michaelni
Sat Apr 7 21:18:29 CEST 2007


Hi

On Sat, Apr 07, 2007 at 09:47:10PM +0300, Anssi Hannula wrote:
> Michael Niedermayer wrote:
> > Hi
> > 
> > On Sat, Apr 07, 2007 at 09:19:51PM +0300, Anssi Hannula wrote:
> > [...]
> >>>> +    st->codec->extradata = av_malloc(st->codec->extradata_size +
> >>>> +                                     FF_INPUT_BUFFER_PADDING_SIZE);
> >>>> +    if (!st->codec->extradata) {
> >>>> +        av_free(st->codec);
> >>>> +        av_free(st);
> >>> if you insist on this freeing stuff
> >> Well IMHO it is preferred to having a memleak... Of course we could just
> >> ignore the allocation failure and do not set extradata at all, avoiding
> >> the freeing.
> > 
> > IMHO memleak is better then later calling free on a pointer stored in
> > unallocated memory which will happen as soon as someone fixed
> > av_open_input_stream() to do proper cleanup
> 
> Okay, attached is a patch with the freeing removed.

looks ok

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you really think that XML is the answer, then you definitly missunderstood
the question -- Attila Kinali
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070407/e3a2ddfd/attachment.pgp>



More information about the ffmpeg-devel mailing list