Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2017-05-19 14:04:27 +0300
committerHendrik Leppkes <h.leppkes@gmail.com>2017-08-04 20:18:34 +0300
commitbbe1dda6be342088e1ea713465ceb65e03273be4 (patch)
tree5aabb010a6710628a6a7174c5472d54b30f39b1a
parent35c4b7d77fbe3a8a926da0d064cb4e3c5020e0cb (diff)
avcodec/extract_extradata_bsf: support extracting extradata from h264 mvc
-rw-r--r--libavcodec/extract_extradata_bsf.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/extract_extradata_bsf.c b/libavcodec/extract_extradata_bsf.c
index 4a48d3c710..ec6b0a649b 100644
--- a/libavcodec/extract_extradata_bsf.c
+++ b/libavcodec/extract_extradata_bsf.c
@@ -56,7 +56,7 @@ static int extract_extradata_h2645(AVBSFContext *ctx, AVPacket *pkt,
HEVC_NAL_VPS, HEVC_NAL_SPS, HEVC_NAL_PPS, HEVC_NAL_SEI_PREFIX, HEVC_NAL_SEI_SUFFIX,
};
static const int extradata_nal_types_h264[] = {
- H264_NAL_SPS, H264_NAL_PPS, H264_NAL_SEI,
+ H264_NAL_SPS, H264_NAL_SPS_SUBSET, H264_NAL_PPS, H264_NAL_SEI,
};
ExtractExtradataContext *s = ctx->priv_data;
@@ -88,14 +88,14 @@ static int extract_extradata_h2645(AVBSFContext *ctx, AVPacket *pkt,
if (nal->type == HEVC_NAL_SPS) has_sps = 1;
if (nal->type == HEVC_NAL_VPS) has_vps = 1;
} else {
- if (nal->type == H264_NAL_SPS) has_sps = 1;
+ if (nal->type == H264_NAL_SPS || nal->type == H264_NAL_SPS_SUBSET) has_sps = 1;
}
}
}
if (extradata_size &&
((ctx->par_in->codec_id == AV_CODEC_ID_HEVC && has_sps && has_vps) ||
- (ctx->par_in->codec_id == AV_CODEC_ID_H264 && has_sps))) {
+ ((ctx->par_in->codec_id == AV_CODEC_ID_H264 || ctx->par_in->codec_id == AV_CODEC_ID_H264_MVC) && has_sps))) {
AVBufferRef *filtered_buf;
uint8_t *extradata, *filtered_data;
@@ -244,6 +244,7 @@ static const struct {
} extract_tab[] = {
{ AV_CODEC_ID_CAVS, extract_extradata_mpeg4 },
{ AV_CODEC_ID_H264, extract_extradata_h2645 },
+ { AV_CODEC_ID_H264_MVC, extract_extradata_h2645 },
{ AV_CODEC_ID_HEVC, extract_extradata_h2645 },
{ AV_CODEC_ID_MPEG1VIDEO, extract_extradata_mpeg12 },
{ AV_CODEC_ID_MPEG2VIDEO, extract_extradata_mpeg12 },
@@ -303,6 +304,7 @@ fail:
static const enum AVCodecID codec_ids[] = {
AV_CODEC_ID_CAVS,
AV_CODEC_ID_H264,
+ AV_CODEC_ID_H264_MVC,
AV_CODEC_ID_HEVC,
AV_CODEC_ID_MPEG1VIDEO,
AV_CODEC_ID_MPEG2VIDEO,