mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 11:39:47 +00:00
avformat/aviobuf: check if read_packet() exist before read_packet_wrapper()
without it, read_packet_wrapper() will return AVERROR(EINVAL) and avio_read will be failed. Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
This commit is contained in:
parent
b236ef0a59
commit
3c74ffb01a
@ -646,7 +646,7 @@ int avio_read(AVIOContext *s, unsigned char *buf, int size)
|
||||
while (size > 0) {
|
||||
len = FFMIN(s->buf_end - s->buf_ptr, size);
|
||||
if (len == 0 || s->write_flag) {
|
||||
if((s->direct || size > s->buffer_size) && !s->update_checksum) {
|
||||
if((s->direct || size > s->buffer_size) && !s->update_checksum && s->read_packet) {
|
||||
// bypass the buffer and read data directly into buf
|
||||
len = read_packet_wrapper(s, buf, size);
|
||||
if (len == AVERROR_EOF) {
|
||||
|
Loading…
Reference in New Issue
Block a user