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

Ronald S. Bultje rsbultje
Mon Nov 5 06:42:19 CET 2007


Hi,

On 11/4/07, Ronald S. Bultje <rsbultje at gmail.com> wrote:
>
>
> 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.
>

Let me do this differently, here's the two combined, if you prefer it this
way. I'll try to split relevant code out per-function next.

Ronald
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rmdec-allownulls.patch
Type: application/octet-stream
Size: 2912 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071104/7500fcea/attachment.obj>



More information about the ffmpeg-devel mailing list