On 28/11/14 13:22, Anton Khirnov wrote:
There is no point in clearing reference explicitly, since that will be
done as a part of ff_h264_unref_picture() right below.
---
  libavcodec/h264.c | 6 +-----
  1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index a392054..bde929e 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1073,11 +1073,7 @@ static void flush_dpb(AVCodecContext *avctx)
      H264Context *h = avctx->priv_data;
      int i;

-    for (i = 0; i < MAX_DELAYED_PIC_COUNT; i++) {
-        if (h->delayed_pic[i])
-            h->delayed_pic[i]->reference = 0;
-        h->delayed_pic[i] = NULL;
-    }
+    memset(h->delayed_pic, 0, sizeof(h->delayed_pic));

      ff_h264_flush_change(h);



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

Reply via email to