[FFmpeg-devel] [PATCH] allow to call rm_read_audio_stream_info() with NULL AVFormatcontext

Michael Niedermayer michaelni
Mon Nov 5 09:33:06 CET 2007


Hi

On Sun, Nov 04, 2007 at 09:31:56PM -0800, Ronald S. Bultje wrote:
> Hi,
> 
> On 11/4/07, Michael Niedermayer <michaelni at gmx.at> wrote:
> >
> > darn, how often do i need to repeat it, i think thats at least the 3rd
> > time
> > i see this patch
> > rejected!!!
> >
> > the code will CRASH if s is NULL, open you eyes:
> >     ByteIOContext *pb = &s->pb;
> > pb is not valid here, &NULL->pb; is not a valid pointer
> 
> 
> I sort of expected this, I think I submitted this before a long while ago
> but I couldn't find it. Anyway, I have a next patch that does that, I'm
> trying to isolate functional units of code to get this stuff done. This next
> patch adds new function arguments that separates the pb/rm contexts from the
> s as new function arguments. If you can think of a prettier way, please let
> me know.

the very first question about this is, why is this patch necessary?
looking at it again it doesnt look like it would make any difference at
all besides skiping metadata, i hardly would call that essential

so what does this really do? if this is supposed to prevent metadata
from being overwritten then i wouldnt call it essential for RDT
nor a prerequesit for any other patch(es)

and besides that, you could pass a int skip_metadata as argument to the
function to achive that effect, setting the main context to NULL and then
directly passing everything the function needs from the main context is an
incredible hack

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

There will always be a question for which you do not know the correct awnser.
-------------- 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/20071105/2d1cb6f2/attachment.pgp>



More information about the ffmpeg-devel mailing list