Skip to content
Snippets Groups Projects
Commit c7227ecf authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf
Browse files

avcodec: vdpau: do not rely on AVCodecContext->refs for HEVC

lavc doesn't set this value to a meaningful value. Only the H264 codec
has this value properly set.

Bogus log introduced in 7905bf1e.
Before the code would rely on refs which is one and add 5 arbitrary pictures
which was OK until HEVC and VP9 were introduced.
parent c6c30498
No related branches found
No related tags found
1 merge request!334avcodec: vdpau: do not rely on AVCodecContext->refs for HEVC
Pipeline #112603 passed with stage
in 21 minutes and 32 seconds
......@@ -189,10 +189,12 @@ static int Open(vlc_va_t *va, AVCodecContext *avctx, enum AVPixelFormat hwfmt, c
unsigned codec_refs;
switch (avctx->codec_id)
{
case AV_CODEC_ID_HEVC:
case AV_CODEC_ID_H264:
codec_refs = avctx->refs; // we can rely on this
break;
case AV_CODEC_ID_HEVC:
codec_refs = 16;
break;
case AV_CODEC_ID_VP9:
codec_refs = 8;
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment