[FFmpeg-cvslog] avformat/nutdec: Don't shrink packet size manually
Andreas Rheinhardt
git at videolan.org
Sun Sep 25 15:58:31 EEST 2022
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Tue Sep 20 17:23:55 2022 +0200| [843fe314ea30a3b7ccaa165031663292d14a9e02] | committer: Andreas Rheinhardt
avformat/nutdec: Don't shrink packet size manually
It is unnecessary because an av_shrink_packet() a few lines below
will set the size; furthermore, it is actually harmful, because
av_shrink_packet() does nothing in case the size already matches,
so that the packet's padding is not correctly zeroed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=843fe314ea30a3b7ccaa165031663292d14a9e02
---
libavformat/nutdec.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index 24dedc4758..afa27b827c 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -1132,7 +1132,6 @@ static int decode_frame(NUTContext *nut, AVPacket *pkt, int frame_code)
}
sm_size = avio_tell(bc) - pkt->pos;
size -= sm_size;
- pkt->size -= sm_size;
}
ret = avio_read(bc, pkt->data + nut->header_len[header_idx], size);
More information about the ffmpeg-cvslog
mailing list