[FFmpeg-devel] assertions in aviobu.c while playing http stream
Martin Storsjö
martin
Tue Jul 20 12:00:14 CEST 2010
On Tue, 20 Jul 2010, avcoder wrote:
> check my ooold mail on 2009/04/22
Oh, interesting! You should have pinged the case to get it applied then
already. :-)
And please don't top-post. :-)
> "
> Dear:
>
> Could we directly remove the "assert(s->buf_ptr == s->buf_end)" in
> fill_buffer()?
>
> If not,please check the following patch
>
> Thanks
>
> Index: aviobuf.c
> ===================================================================
> --- aviobuf.c ??? 18659?
> +++ aviobuf.c ??????
> @@ -153,8 +153,11 @@
> s->buf_ptr = s->buffer + offset1;
> } else if(s->is_streamed && !s->write_flag &&
> offset1 >= 0 && offset1 < (s->buf_end - s->buffer) + (1<<16)){
> - while(s->pos < offset && !s->eof_reached)
> + while(s->pos < offset && !s->eof_reached){
> + /* skip the unused buffer,avoid assert() in fill_buffer() */
> + s->buf_ptr = s->buf_end;
> fill_buffer(s);
> + }
> if (s->eof_reached)
> return AVERROR(EPIPE);
> s->buf_ptr = s->buf_end + offset - s->pos;
>
> "
>
> The answer from Michael:
>
> "
> On Wed, Apr 22, 2009 at 05:12:36PM +0800, avcoder wrote:
> > Dear:
> > Could we directly remove the "assert(s->buf_ptr == s->buf_end)" in
> > fill_buffer()?
>
> probably yes, if its tested
Tested and applied.
// Martin
More information about the ffmpeg-devel
mailing list