aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264_ps.c
diff options
context:
space:
mode:
authorJanne Grunau <janne-ffmpeg@jannau.net>2011-01-28 22:15:47 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-02-02 03:40:50 +0100
commit94e3e83f13bcf45a6447c007ba06da1a3b896605 (patch)
tree416719ae1649399facd1c9eb5801601fa1511a60 /libavcodec/h264_ps.c
parent8a92ec71b3dfc42ce4f34be79facade397db0f70 (diff)
downloadffmpeg-94e3e83f13bcf45a6447c007ba06da1a3b896605.tar.gz
h264: Add Intra and Constrained Baseline profiles to avctx.profile
(cherry picked from commit fe9a3fbe42ebe5debd57550313ed4c3a065f1770)
Diffstat (limited to 'libavcodec/h264_ps.c')
-rw-r--r--libavcodec/h264_ps.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index 876bcb2a43..3fe5815ea6 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -267,16 +267,16 @@ static void decode_scaling_matrices(H264Context *h, SPS *sps, PPS *pps, int is_s
int ff_h264_decode_seq_parameter_set(H264Context *h){
MpegEncContext * const s = &h->s;
- int profile_idc, level_idc;
+ int profile_idc, level_idc, constraint_set_flags = 0;
unsigned int sps_id;
int i;
SPS *sps;
profile_idc= get_bits(&s->gb, 8);
- get_bits1(&s->gb); //constraint_set0_flag
- get_bits1(&s->gb); //constraint_set1_flag
- get_bits1(&s->gb); //constraint_set2_flag
- get_bits1(&s->gb); //constraint_set3_flag
+ constraint_set_flags |= get_bits1(&s->gb) << 0; //constraint_set0_flag
+ constraint_set_flags |= get_bits1(&s->gb) << 1; //constraint_set1_flag
+ constraint_set_flags |= get_bits1(&s->gb) << 2; //constraint_set2_flag
+ constraint_set_flags |= get_bits1(&s->gb) << 3; //constraint_set3_flag
get_bits(&s->gb, 4); // reserved
level_idc= get_bits(&s->gb, 8);
sps_id= get_ue_golomb_31(&s->gb);
@@ -291,6 +291,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
sps->time_offset_length = 24;
sps->profile_idc= profile_idc;
+ sps->constraint_set_flags = constraint_set_flags;
sps->level_idc= level_idc;
memset(sps->scaling_matrix4, 16, sizeof(sps->scaling_matrix4));