summaryrefslogtreecommitdiff
path: root/libavcodec/h264_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/h264_parser.c')
-rw-r--r--libavcodec/h264_parser.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
index 2628195..743bd76 100644
--- a/libavcodec/h264_parser.c
+++ b/libavcodec/h264_parser.c
@@ -197,6 +197,7 @@ static inline int parse_nal_units(AVCodecParserContext *s,
init_get_bits(&h->s.gb, ptr, 8*dst_length);
switch(h->nal_unit_type) {
case NAL_SPS:
+ case NAL_SUBSET_SEQ_PARAM_SET:
ff_h264_decode_seq_parameter_set(h);
break;
case NAL_PPS:
@@ -230,7 +231,17 @@ static inline int parse_nal_units(AVCodecParserContext *s,
av_log(h->s.avctx, AV_LOG_ERROR, "non-existing SPS referenced\n");
return -1;
}
- h->sps = *h->sps_buffers[h->pps.sps_id];
+
+ /*
+ ** if current stream is mvc stream, use mvc profile_idc as
+ ** sps->profile_idc, all here is for report mvc profile_idc
+ ** to player for mvc disable support.
+ ** @Sep 17th, 2013, by hbb.
+ */
+ if ((h->sps.profile_idc !=118) && (h->sps.profile_idc !=128)) {
+ h->sps = *h->sps_buffers[h->pps.sps_id];
+ }
+
h->frame_num = get_bits(&h->s.gb, h->sps.log2_max_frame_num);
avctx->profile = ff_h264_get_profile(&h->sps);