Revision fe9a3fbe libavcodec/h264_ps.c

View differences:

libavcodec/h264_ps.c
267 267

  
268 268
int ff_h264_decode_seq_parameter_set(H264Context *h){
269 269
    MpegEncContext * const s = &h->s;
270
    int profile_idc, level_idc;
270
    int profile_idc, level_idc, constraint_set_flags = 0;
271 271
    unsigned int sps_id;
272 272
    int i;
273 273
    SPS *sps;
274 274

  
275 275
    profile_idc= get_bits(&s->gb, 8);
276
    get_bits1(&s->gb);   //constraint_set0_flag
277
    get_bits1(&s->gb);   //constraint_set1_flag
278
    get_bits1(&s->gb);   //constraint_set2_flag
279
    get_bits1(&s->gb);   //constraint_set3_flag
276
    constraint_set_flags |= get_bits1(&s->gb) << 0;   //constraint_set0_flag
277
    constraint_set_flags |= get_bits1(&s->gb) << 1;   //constraint_set1_flag
278
    constraint_set_flags |= get_bits1(&s->gb) << 2;   //constraint_set2_flag
279
    constraint_set_flags |= get_bits1(&s->gb) << 3;   //constraint_set3_flag
280 280
    get_bits(&s->gb, 4); // reserved
281 281
    level_idc= get_bits(&s->gb, 8);
282 282
    sps_id= get_ue_golomb_31(&s->gb);
......
291 291

  
292 292
    sps->time_offset_length = 24;
293 293
    sps->profile_idc= profile_idc;
294
    sps->constraint_set_flags = constraint_set_flags;
294 295
    sps->level_idc= level_idc;
295 296

  
296 297
    memset(sps->scaling_matrix4, 16, sizeof(sps->scaling_matrix4));

Also available in: Unified diff