summaryrefslogtreecommitdiff
path: root/libavcodec/mediacodecdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/mediacodecdec.c')
-rw-r--r--libavcodec/mediacodecdec.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/mediacodecdec.c b/libavcodec/mediacodecdec.c
index 676ade73a1..0b08f02089 100644
--- a/libavcodec/mediacodecdec.c
+++ b/libavcodec/mediacodecdec.c
@@ -308,10 +308,16 @@ int ff_mediacodec_dec_init(AVCodecContext *avctx, MediaCodecDecContext *s,
{
int ret = 0;
int status;
+ int profile;
s->first_buffer_at = av_gettime();
- s->codec_name = ff_AMediaCodecList_getCodecNameByType(mime, avctx);
+ profile = ff_AMediaCodecProfile_getProfileFromAVCodecContext(avctx);
+ if (profile < 0) {
+ av_log(avctx, AV_LOG_WARNING, "Unsupported or unknown profile");
+ }
+
+ s->codec_name = ff_AMediaCodecList_getCodecNameByType(mime, profile, 0, avctx);
if (!s->codec_name) {
ret = AVERROR_EXTERNAL;
goto fail;