changeset 4020:9d94163ca066 libavformat

always use the whole buffer for reading w/ packetized sources to avoid packet truncation
author henry
date Mon, 10 Nov 2008 21:41:35 +0000
parents a2539db62994
children 6390b29b59f2
files aviobuf.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/aviobuf.c	Sat Nov 08 18:37:03 2008 +0000
+++ b/aviobuf.c	Mon Nov 10 21:41:35 2008 +0000
@@ -290,7 +290,7 @@
 
 static void fill_buffer(ByteIOContext *s)
 {
-    uint8_t *dst= s->buf_end - s->buffer < s->buffer_size ? s->buf_ptr : s->buffer;
+    uint8_t *dst= !s->max_packet_size && s->buf_end - s->buffer < s->buffer_size ? s->buf_ptr : s->buffer;
     int len= s->buffer_size - (dst - s->buffer);
 
     assert(s->buf_ptr == s->buf_end);