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.rheinha...@outlook.com>
---
I was about to make append_packet_chunked non-static, but then I noticed
that it unrefs the packet if the end size is zero (this might cause
problems for side-data only packets).

 libavformat/nutdec.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index 8cc56615ad..1d04f51d8d 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -1127,7 +1127,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);
-- 
2.34.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to