[FFmpeg-devel] [PATCH 03/36] avcodec/vp9_superframe_bsf: Flush bsf upon superframe creation error
Andreas Rheinhardt
andreas.rheinhardt at gmail.com
Sat May 30 19:05:08 EEST 2020
Otherwise we might come into a situation where we have to reject future
packets because the cache is already full.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
---
libavcodec/vp9_superframe_bsf.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/libavcodec/vp9_superframe_bsf.c b/libavcodec/vp9_superframe_bsf.c
index d9c78c67f5..f330970acc 100644
--- a/libavcodec/vp9_superframe_bsf.c
+++ b/libavcodec/vp9_superframe_bsf.c
@@ -169,12 +169,10 @@ static int vp9_superframe_filter(AVBSFContext *ctx, AVPacket *pkt)
av_assert0(s->n_cache > 0);
// build superframe
- if ((res = merge_superframe(s->cache, s->n_cache, pkt)) < 0)
- goto done;
+ res = merge_superframe(s->cache, s->n_cache, pkt);
- res = av_packet_copy_props(pkt, s->cache[s->n_cache - 1]);
- if (res < 0)
- goto done;
+ if (res >= 0)
+ res = av_packet_copy_props(pkt, s->cache[s->n_cache - 1]);
vp9_superframe_flush(ctx);
--
2.20.1
More information about the ffmpeg-devel
mailing list