[libav-devel] [PATCH] applehttp: Only check the discard flags if v->ctx actually is initialized
martin at martin.st
Wed Apr 13 08:39:03 CEST 2011
On Tue, 12 Apr 2011, Ronald S. Bultje wrote:
> On Tue, Apr 12, 2011 at 3:57 AM, Martin Storsjö <martin at martin.st> wrote:
> > This code could be executed if the demuxer reads more than one
> > segment before returning from av_open_input_stream.
> > ---
> > libavformat/applehttp.c | 11 +++++++----
> > 1 files changed, 7 insertions(+), 4 deletions(-)
> Is this a real issue?
I haven't seen it occur in practice (yet), but I ran into it while testing
the AES crypto support - if unable to probe the stream reliably, it will
read more than one segment, and currently it will crash at that point.
> Looks OK to me, maybe a warning would be nice otherwise (does it miss
> data otherwise, or does it only happen during preroll stage?).
This isn't really something (in itself) to warn the user about - if the
segments are too short for the demuxer to open with only one segment, just
continue with the next one, as we would do otherwise. Just don't try to do
the "allow bitrate switching between segments" logic at this point, since
we aren't at a stage where that makes sense to do yet.
Queued this version then.
More information about the libav-devel