[FFmpeg-devel] [PATCH] lavu/hwcontext_vaapi: ignore nonexistent device in default DRM device selection

Xiang, Haihao haihao.xiang at intel.com
Tue Nov 28 04:45:55 EET 2023


> Quoting Xiang, Haihao (2023-11-27 05:42:20)
> > > 
> > > Also, the else is unnecessary since the if() block ends with continue.
> > > 
> > 
> > I wanted to print a message if all devices don't exist. I'll remove it in
> > the
> > new version if you think such info is unnecessary. 
> 
> I don't object to the message, I mean just that
> 
> if (foo) {
>   ....
>   continue;
> } else
>   bar;
> 
> is equivalent to
> 
> if (foo) {
>   ....
>   continue;
> }
> 
> bar;
> 
> The latter saves you one level of indentation and I find it more
> readable.

I got your point, many thanks for your explanations. 

BRs
Haihao

> 



More information about the ffmpeg-devel mailing list