[FFmpeg-devel] Patch: avoid assert() of fill_buffer() in streaming mode(such as ASF streaming.)
avcoder
ffmpeg
Wed Apr 22 11:12:36 CEST 2009
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;
--
----------------------------------------------
Inspired by http://ppnext.com
Your potential. Our passion.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_assert_aviobuf.diff
Type: application/octet-stream
Size: 705 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090422/f1550c5c/attachment.obj>
More information about the ffmpeg-devel
mailing list