always use the whole buffer for reading w/ packetized sources to avoid packet truncation

Originally committed as revision 15799 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Jindřich Makovička 2008-11-10 21:41:35 +00:00
parent 916ff02261
commit f5edd874fa
1 changed files with 1 additions and 1 deletions

View File

@ -290,7 +290,7 @@ void put_tag(ByteIOContext *s, const char *tag)
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);