Revert "avcodec/vp9_superframe_bsf: cache packets by creating new references rather...
authorJames Almer <jamrial@gmail.com>
Sat, 24 Mar 2018 01:19:42 +0000 (22:19 -0300)
committerJames Almer <jamrial@gmail.com>
Sat, 24 Mar 2018 14:17:55 +0000 (11:17 -0300)
This reverts commit 7a02b364b68c0bf7f065f5c217fae458f0efdb8d.

The packet fetched by ff_bsf_get_packet() and ff_bsf_get_packet_ref()
is now guaranteed to be reference counted.

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
libavcodec/vp9_superframe_bsf.c

index 2ea49c6..52569ab 100644 (file)
@@ -147,9 +147,7 @@ static int vp9_superframe_filter(AVBSFContext *ctx, AVPacket *out)
         goto done;
     }
 
-    res = av_packet_ref(s->cache[s->n_cache++], in);
-    if (res < 0)
-        goto done;
+    av_packet_move_ref(s->cache[s->n_cache++], in);
 
     if (invisible) {
         res = AVERROR(EAGAIN);