#include "decode.h"
#include "h264_parse.h"
#include "hevc_parse.h"
-#include "hwaccel.h"
+#include "hwconfig.h"
#include "internal.h"
#include "mediacodec_wrapper.h"
#include "mediacodecdec_common.h"
ff_AMediaFormat_setBuffer(format, "csd-1", (void*)data, data_size);
av_freep(&data);
} else {
- av_log(avctx, AV_LOG_ERROR, "Could not extract PPS/SPS from extradata");
- ret = AVERROR_INVALIDDATA;
+ const int warn = is_avc && (avctx->codec_tag == MKTAG('a','v','c','1') ||
+ avctx->codec_tag == MKTAG('a','v','c','2'));
+ av_log(avctx, warn ? AV_LOG_WARNING : AV_LOG_DEBUG,
+ "Could not extract PPS/SPS from extradata\n");
+ ret = 0;
}
done:
av_freep(&data);
} else {
- av_log(avctx, AV_LOG_ERROR, "Could not extract VPS/PPS/SPS from extradata");
- ret = AVERROR_INVALIDDATA;
+ const int warn = is_nalff && avctx->codec_tag == MKTAG('h','v','c','1');
+ av_log(avctx, warn ? AV_LOG_WARNING : AV_LOG_DEBUG,
+ "Could not extract VPS/PPS/SPS from extradata\n");
+ ret = 0;
}
done:
ff_mediacodec_dec_flush(avctx, s->ctx);
}
-static const AVCodecHWConfigInternal *mediacodec_hw_configs[] = {
+static const AVCodecHWConfigInternal *const mediacodec_hw_configs[] = {
&(const AVCodecHWConfigInternal) {
.public = {
.pix_fmt = AV_PIX_FMT_MEDIACODEC,
#define DECLARE_MEDIACODEC_VDEC(short_name, full_name, codec_id, bsf) \
DECLARE_MEDIACODEC_VCLASS(short_name) \
-AVCodec ff_##short_name##_mediacodec_decoder = { \
+const AVCodec ff_ ## short_name ## _mediacodec_decoder = { \
.name = #short_name "_mediacodec", \
.long_name = NULL_IF_CONFIG_SMALL(full_name " Android MediaCodec decoder"), \
.type = AVMEDIA_TYPE_VIDEO, \