[vlc-devel] Crash in ThreadDisplayRenderPicture

Rémi Denis-Courmont remi at remlab.net
Wed Jan 5 18:34:51 CET 2011


Le mardi 4 janvier 2011 23:34:40 Juha Jeronen, vous avez écrit :
> Consider the following snippet:
> 
> ---8<---8<---8<---
>          if (vout->p->is_decoder_pool_slow) {
>              direct = picture_pool_Get(vout->p->display_pool);
>              if (direct)
>                  picture_Copy(direct, render);
>              picture_Release(render);
> 
>          } else {
>              direct = render;
>          }
>          VideoFormatCopyCropAr(&direct->format, &filtered->format);
> ---8<---8<---8<---
> 
> The variable "direct" is a picture_t* initialized as NULL. If
> vout->p->is_decoder_pool_slow is true, but for some reason there is no
> picture in the display pool, direct will remain NULL and VLC will crash.
> 
> It seems it's just a simple mistake - just after the above snippet, the
> renderer aborts if direct is NULL.
> 
> A reliable way to reproduce the crash is to set any framerate doubling
> deinterlacer as the default (try bob or yadif2x), restart VLC and then
> open a DVD. It will also happen randomly during DVD playback, if a
> framerate doubling deinterlacer is enabled. Also very often when pausing.
> 
> I fixed this in my copy by adding a check:
> 
> ---8<---8<---8<---
> 
> |        if(direct)
> 
>              VideoFormatCopyCropAr(&direct->format, &filtered->format);
>          else
>              msg_Warn( vout, "ThreadDisplayRenderPicture(): direct is
> NULL, aborting" );
> 
> |---8<---8<---8<---
> 
> I don't know if the warning is a good idea in the long run, but I think
> the check is required.

Yeah. It even seems a little bit more complicated/buggy. Is it fixed now?

-- 
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis



More information about the vlc-devel mailing list