mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
brstm: do not return partial packets
Such packets are useless. Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
857d7194ca
commit
fe63d41302
@ -266,19 +266,18 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
(b->current_block - 1), 4 * codec->channels);
|
||||
|
||||
ret = avio_read(s->pb, dst, size);
|
||||
if (ret < 0) {
|
||||
if (ret != size)
|
||||
av_free_packet(pkt);
|
||||
return ret;
|
||||
}
|
||||
pkt->duration = samples;
|
||||
} else {
|
||||
ret = av_get_packet(s->pb, pkt, size);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
pkt->stream_index = 0;
|
||||
|
||||
if (ret != size)
|
||||
ret = AVERROR(EIO);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user