mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/adp, svs: Remove redundant av_shrink_packet()
av_get_packet() already makes sure that the packet size is accurate and that the packet data is zero-padded even when one could not read as much as desired. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
51367267c8
commit
d025a5bcc2
@ -75,13 +75,9 @@ static int adp_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
return AVERROR_EOF;
|
||||
|
||||
ret = av_get_packet(s->pb, pkt, size);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if (ret != size) {
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
av_shrink_packet(pkt, ret);
|
||||
}
|
||||
pkt->stream_index = 0;
|
||||
|
||||
return ret;
|
||||
|
@ -79,7 +79,6 @@ static int svs_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
if (ret != 32 * 256) {
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
av_shrink_packet(pkt, ret);
|
||||
pkt->flags &= ~AV_PKT_FLAG_CORRUPT;
|
||||
}
|
||||
pkt->stream_index = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user