Skip to content

Commit

Permalink
HwFramesContext config method support
Browse files Browse the repository at this point in the history
  • Loading branch information
boogieeeee committed Jan 1, 2024
1 parent 9e73140 commit 3848781
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libavcodec/rkmppdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ static av_cold int rkmpp_decode_init(AVCodecContext *avctx)
is_fmt_supported =
avctx->codec_id == AV_CODEC_ID_H264;
break;
// fallback to drm prime
case AV_PIX_FMT_DRM_PRIME:
case AV_PIX_FMT_NONE:
is_fmt_supported = 1;
avctx->pix_fmt = AV_PIX_FMT_DRM_PRIME;
break;
default:
is_fmt_supported = 0;
break;
Expand Down
1 change: 1 addition & 0 deletions libavcodec/rkmppdec.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ static const AVCodecHWConfigInternal *const rkmpp_dec_hw_configs[] = {
.public = {
.pix_fmt = AV_PIX_FMT_DRM_PRIME,
.methods = AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX |
AV_CODEC_HW_CONFIG_METHOD_HW_FRAMES_CTX |
AV_CODEC_HW_CONFIG_METHOD_INTERNAL,
.device_type = AV_HWDEVICE_TYPE_RKMPP,
},
Expand Down

0 comments on commit 3848781

Please sign in to comment.