summaryrefslogtreecommitdiff
path: root/libavcodec/pcm_rechunk_bsf.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2023-04-17 20:52:23 -0300
committerJames Almer <jamrial@gmail.com>2023-04-21 17:14:36 -0300
commit86645bf0a6b2a02b90bf0a17a14d7e750b1b9d40 (patch)
treed694bcdca9d3bf19284570ef7633a2bedb86fd39 /libavcodec/pcm_rechunk_bsf.c
parent453b524974423de9d933f5856b511d2b3f4cdec6 (diff)
avcodec/pcm_rechunk_bsf: assert that in_pkt is empty after merging its data into out_pkt
If it's not empty here, then a leak would ocurr immediately after. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/pcm_rechunk_bsf.c')
-rw-r--r--libavcodec/pcm_rechunk_bsf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/pcm_rechunk_bsf.c b/libavcodec/pcm_rechunk_bsf.c
index 032f914916..28b5722ac9 100644
--- a/libavcodec/pcm_rechunk_bsf.c
+++ b/libavcodec/pcm_rechunk_bsf.c
@@ -139,6 +139,7 @@ static int rechunk_filter(AVBSFContext *ctx, AVPacket *pkt)
av_packet_move_ref(pkt, s->out_pkt);
return send_packet(s, nb_samples, pkt);
}
+ av_assert0(!s->in_pkt->size);
} else if (s->in_pkt->size > data_size) {
ret = av_packet_ref(pkt, s->in_pkt);
if (ret < 0)