Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
decoder_vt: select nv12 if probing didn't detect pix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ubitux committed Mar 15, 2022
1 parent 8219b1b commit a00b1f9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/decoder_vt.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,10 @@ static enum AVPixelFormat select_pix_fmt(const enum AVPixelFormat *pix_fmts,
int nb_pix_fmts,
enum AVPixelFormat in_pix_fmt)
{
/* If file probing wasn't able to detect the pixel format, we force it to NV12 if available */
if (in_pix_fmt == AV_PIX_FMT_NONE && is_pix_fmt_allowed(pix_fmts, nb_pix_fmts, AV_PIX_FMT_NV12))
return AV_PIX_FMT_NV12;

static const enum AVPixelFormat supported_pix_fmts[] = {
AV_PIX_FMT_NV12,
AV_PIX_FMT_NV16,
Expand Down

0 comments on commit a00b1f9

Please sign in to comment.