Commit 9163a7fd authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

avcodec: use picture_Clone() (fixes #18176)

parent 00425a25
......@@ -1166,7 +1166,17 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block, bool *error
picture_Hold( p_pic );
/* Some codecs can return the same frame multiple times. By the
* time that the same frame is returned a second time, it will be
* too late to clone the underlying picture. So clone proactively.
* A single picture CANNOT be queued multiple times.
p_pic = picture_Clone( p_pic );
if( unlikely(p_pic == NULL) )
if( !p_dec-> || !p_dec-> )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment