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.rheinha...@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

_______________________________________________
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