Browse Source

avcodec: va: set the software source for special AV1 decoder

So far we did not need it. We should always have the format matching
the one we detected by the decoder. If we don't that means the packetizer
failed to reset the decoder.

(cherry picked from commit c901da645b)
Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
cherry-pick-c5513cf9
Steve Lhomme 3 years ago
parent
commit
dfdc90c30a
  1. 12
      modules/codec/avcodec/video.c

12
modules/codec/avcodec/video.c

@ -1757,8 +1757,18 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
/* Use the default fmt in priority of any sw fmt if the default fmt is a hw
* one */
if (defaultfmt != AV_PIX_FMT_NONE && !p_sys->b_hardware_only)
if (defaultfmt != AV_PIX_FMT_NONE)
{
if (p_sys->b_hardware_only)
{
if (defaultfmt != p_context->sw_pix_fmt)
{
// the source format changed and we didn't detect it
vlc_assert_unreachable();
}
}
swfmt = defaultfmt;
}
if (p_sys->pix_fmt == AV_PIX_FMT_NONE)
goto no_reuse;

Loading…
Cancel
Save