comparison h264_parser.c @ 11047:ec682347e19e libavcodec

Export H264 profile and level in AVCodecContext. Patch by Rafa¸«³l Carr¸«±, rafael D carre A gmail
author cehoyos
date Thu, 28 Jan 2010 20:57:29 +0000
parents 916df4ea4e64
children 7dd2a45249a9
comparison
equal deleted inserted replaced
11046:15add32dd717 11047:ec682347e19e
183 return -1; 183 return -1;
184 } 184 }
185 h->sps = *h->sps_buffers[h->pps.sps_id]; 185 h->sps = *h->sps_buffers[h->pps.sps_id];
186 h->frame_num = get_bits(&h->s.gb, h->sps.log2_max_frame_num); 186 h->frame_num = get_bits(&h->s.gb, h->sps.log2_max_frame_num);
187 187
188 avctx->profile = h->sps.profile_idc;
189 avctx->level = h->sps.level_idc;
190
188 if(h->sps.frame_mbs_only_flag){ 191 if(h->sps.frame_mbs_only_flag){
189 h->s.picture_structure= PICT_FRAME; 192 h->s.picture_structure= PICT_FRAME;
190 }else{ 193 }else{
191 if(get_bits1(&h->s.gb)) { //field_pic_flag 194 if(get_bits1(&h->s.gb)) { //field_pic_flag
192 h->s.picture_structure= PICT_TOP_FIELD + get_bits1(&h->s.gb); //bottom_field_flag 195 h->s.picture_structure= PICT_TOP_FIELD + get_bits1(&h->s.gb); //bottom_field_flag