[vlc-devel] [PATCH] DxVA2: improve the algorithm to look for the oldest buffer
Rémi Denis-Courmont
remi at remlab.net
Thu Apr 2 17:29:34 CEST 2015
Le 2015-04-02 17:36, Steve Lhomme a écrit :
>> @@ -507,6 +505,7 @@ static void Release(void *opaque, uint8_t *data)
>> vlc_mutex_lock( &surface->sys->surface_lock );
>>
>> surface->refcount--;
>> + surface->order = surface->sys->surface_order++;
>
> This is the key part. The "age" is determined by when it was
> released,
> not it was acquired.
Eeither the decoder is broken, or there are not enough pictures. Either
way, the video will be corrupt. I believe that returning NULL is safer
than mismanaging reference counts, but I take note that Laurent
ostensibly thought otherwise.
--
Rémi Denis-Courmont
More information about the vlc-devel
mailing list