[vlc-devel] [vlc-commits] dav1d: picture_Clone the output picture
Thomas Guillem
thomas at gllm.fr
Mon Nov 12 16:57:46 CET 2018
On Mon, Nov 12, 2018, at 16:16, Steve Lhomme wrote:
> 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);
missing an alloc check here.
> 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);
> }
>
> _______________________________________________
> vlc-commits mailing list
> vlc-commits at videolan.org
> https://mailman.videolan.org/listinfo/vlc-commits
More information about the vlc-devel
mailing list