Mercurial > libavcodec.hg
comparison vc1.c @ 3538:f26bf13bbb69 libavcodec
Don't try to decode P-frames from old WMV3 variant until their format is figured
author | kostya |
---|---|
date | Thu, 03 Aug 2006 05:09:36 +0000 |
parents | 79ad5cd43686 |
children | f7b09917c680 |
comparison
equal
deleted
inserted
replaced
3537:f52e3f60481b | 3538:f26bf13bbb69 |
---|---|
1205 { | 1205 { |
1206 v->finterpflag = get_bits(gb, 1); //common | 1206 v->finterpflag = get_bits(gb, 1); //common |
1207 v->res_rtm_flag = get_bits(gb, 1); //reserved | 1207 v->res_rtm_flag = get_bits(gb, 1); //reserved |
1208 if (!v->res_rtm_flag) | 1208 if (!v->res_rtm_flag) |
1209 { | 1209 { |
1210 // av_log(avctx, AV_LOG_ERROR, | |
1211 // "0 for reserved RES_RTM_FLAG is forbidden\n"); | |
1210 av_log(avctx, AV_LOG_ERROR, | 1212 av_log(avctx, AV_LOG_ERROR, |
1211 "0 for reserved RES_RTM_FLAG is forbidden\n"); | 1213 "Old WMV3 version detected, only I-frames will be decoded\n"); |
1212 //return -1; | 1214 //return -1; |
1213 } | 1215 } |
1214 av_log(avctx, AV_LOG_DEBUG, | 1216 av_log(avctx, AV_LOG_DEBUG, |
1215 "Profile %i:\nfrmrtq_postproc=%i, bitrtq_postproc=%i\n" | 1217 "Profile %i:\nfrmrtq_postproc=%i, bitrtq_postproc=%i\n" |
1216 "LoopFilter=%i, MultiRes=%i, FastUVMC=%i, Extended MV=%i\n" | 1218 "LoopFilter=%i, MultiRes=%i, FastUVMC=%i, Extended MV=%i\n" |
3123 init_get_bits(&s->gb, buf, buf_size*8); | 3125 init_get_bits(&s->gb, buf, buf_size*8); |
3124 // do parse frame header | 3126 // do parse frame header |
3125 if(vc1_parse_frame_header(v, &s->gb) == -1) | 3127 if(vc1_parse_frame_header(v, &s->gb) == -1) |
3126 return -1; | 3128 return -1; |
3127 | 3129 |
3128 // if(s->pict_type != I_TYPE && s->pict_type != P_TYPE)return -1; | 3130 if(s->pict_type != I_TYPE && !v->res_rtm_flag)return -1; |
3129 | 3131 |
3130 // for hurry_up==5 | 3132 // for hurry_up==5 |
3131 s->current_picture.pict_type= s->pict_type; | 3133 s->current_picture.pict_type= s->pict_type; |
3132 s->current_picture.key_frame= s->pict_type == I_TYPE; | 3134 s->current_picture.key_frame= s->pict_type == I_TYPE; |
3133 | 3135 |