[FFmpeg-devel] assertions in aviobu.c while playing http stream

Martin Storsjö martin
Tue Jul 20 11:02:22 CEST 2010


On Tue, 20 Jul 2010, Pavel Pavlov wrote:

> I had some problems with http playback recently and I decided to run debug build of libavformat. It appears that because of recent changes it started to constantly assert inside:
> I had the same problem if I tried to run debug build of ffplay
> 
> static void fill_buffer(ByteIOContext *s)
> ...
> assert(s->buf_ptr == s->buf_end);

Hmm, this assert in fill_buffer() does seem to be triggered by the "seek 
by reading forward" code (that was present long before my patch the other 
day, but only used for nonseekable streams). As far as I can see, it can 
be fixed in two ways:

- Remove the assert from fill_buffer(), since we have another use case 
where that isn't true (also, reading the code of fill_buffer(), the assert 
doesn't really seem right)
- Set s->buf_ptr = s->buf_end; before calling fill_buffer() in url_fseek

Michael, which way do you think this should be fixed?

// Martin



More information about the ffmpeg-devel mailing list