[vlc-commits] dav1d: picture_Clone the output picture
    Steve Lhomme 
    git at videolan.org
       
    Mon Nov 12 16:16:56 CET 2018
    
    
  
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Nov 12 16:09:16 2018 +0100| [1d6029cc7501fe2327904f3df3a66ebe1108e573] | committer: Steve Lhomme
dav1d: picture_Clone the output picture
dav1d may return the same buffer/picture_t multiple times. In that case we
can't output the same picture_t pointer multiple time, so we clone it
every time.
Fixes decoding of https://code.videolan.org/videolan/dav1d/uploads/86ea12faad3cd7bd6ab8e6cca34a5b01/wanderers_aq_1.webm
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1d6029cc7501fe2327904f3df3a66ebe1108e573
---
 modules/codec/dav1d.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/codec/dav1d.c b/modules/codec/dav1d.c
index de6d6ae126..f06e38ce70 100644
--- a/modules/codec/dav1d.c
+++ b/modules/codec/dav1d.c
@@ -221,10 +221,10 @@ static int Decode(decoder_t *dec, block_t *block)
         if (res == 0)
         {
             picture_t *pic = img.allocator_data;
+            pic = picture_Clone(pic);
             pic->b_progressive = true; /* codec does not support interlacing */
             pic->date = timestamp_FifoGet(p_sys->ts_fifo);
             /* TODO udpate the color primaries and such */
-            picture_Hold(pic);
             decoder_QueueVideo(dec, pic);
             dav1d_picture_unref(&img);
         }
    
    
More information about the vlc-commits
mailing list