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

diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index b92795d..6ce0287 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -699,10 +699,7 @@ static int h264_decode_frame(AVCodecContext *avctx, void 
*data,
 
         *got_frame = 0;
         if (h->output_frame->buf[0]) {
-            ret = av_frame_ref(pict, h->output_frame);
-            av_frame_unref(h->output_frame);
-            if (ret < 0)
-                return ret;
+            av_frame_move_ref(pict, h->output_frame);
             *got_frame = 1;
         }
     }
-- 
2.0.0

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to