hevc: unref the current frame if frame_start() fails
authorAnton Khirnov <anton@khirnov.net>
Thu, 20 Nov 2014 08:41:56 +0000 (09:41 +0100)
committerAnton Khirnov <anton@khirnov.net>
Tue, 27 Jan 2015 07:34:56 +0000 (08:34 +0100)
Prevents DPB from filling up with damaged input.

libavcodec/hevc.c

index 897a28e..9957f31 100644 (file)
@@ -2460,7 +2460,7 @@ static int hevc_frame_start(HEVCContext *s)
 
 fail:
     if (s->ref)
-        ff_thread_report_progress(&s->ref->tf, INT_MAX, 0);
+        ff_hevc_unref_frame(s, s->ref, ~0);
     s->ref = NULL;
     return ret;
 }