OSDN Git Service

bytestream2: set the reader to the end when reading more than available
authorAnton Khirnov <anton@khirnov.net>
Fri, 10 Jul 2015 07:31:24 +0000 (09:31 +0200)
committerAnton Khirnov <anton@khirnov.net>
Sun, 12 Jul 2015 16:15:39 +0000 (18:15 +0200)
commit86eee85daddb682fa072c2e2657c90a514b855e3
treef1e23c9cb98ad10418f4f1ea3998266a67da2a7e
parent8bc67ec2c0d2b5444d51a1bed1d50f0e10d92717
bytestream2: set the reader to the end when reading more than available

This prevents possible infinite loops with the calling code along the
lines of while (bytestream2_get_bytes_left()) { ... }, where the reader
does not advance.

CC: libav-stable@libav.org
libavcodec/bytestream.h