[FFmpeg-cvslog] Revert "avcodec/vp9_superframe_bsf: cache packets by creating new references rather than moving them"

James Almer git at videolan.org
Sat Mar 24 16:19:17 EET 2018


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Fri Mar 23 22:19:42 2018 -0300| [823362782c4b119f64dfdb5d1348d24b3f64bc3e] | committer: James Almer

Revert "avcodec/vp9_superframe_bsf: cache packets by creating new references rather than moving them"

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 at googlemail.com>
Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=823362782c4b119f64dfdb5d1348d24b3f64bc3e
---

 libavcodec/vp9_superframe_bsf.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavcodec/vp9_superframe_bsf.c b/libavcodec/vp9_superframe_bsf.c
index 2ea49c672d..52569ab097 100644
--- a/libavcodec/vp9_superframe_bsf.c
+++ b/libavcodec/vp9_superframe_bsf.c
@@ -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);



More information about the ffmpeg-cvslog mailing list