Commit 3a74854d authored by diego's avatar diego

Add a few explanatory comments to cornercase workarounds.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@21030 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent f91f89c2
...@@ -5732,9 +5732,9 @@ no_cplx_est: ...@@ -5732,9 +5732,9 @@ no_cplx_est:
if( h_sampling_factor_n==0 || h_sampling_factor_m==0 if( h_sampling_factor_n==0 || h_sampling_factor_m==0
|| v_sampling_factor_n==0 || v_sampling_factor_m==0){ || v_sampling_factor_n==0 || v_sampling_factor_m==0){
/* illegal scalability header (VERY broken encoder),
* trying to workaround */
s->scalability=0; s->scalability=0;
*gb= bak; *gb= bak;
}else }else
av_log(s->avctx, AV_LOG_ERROR, "scalability not supported\n"); av_log(s->avctx, AV_LOG_ERROR, "scalability not supported\n");
...@@ -5847,6 +5847,8 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){ ...@@ -5847,6 +5847,8 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){
s->time= s->time_base*s->avctx->time_base.den + time_increment; s->time= s->time_base*s->avctx->time_base.den + time_increment;
if(s->workaround_bugs&FF_BUG_UMP4){ if(s->workaround_bugs&FF_BUG_UMP4){
if(s->time < s->last_non_b_time){ if(s->time < s->last_non_b_time){
/* header is not mpeg-4-compatible, broken encoder,
* trying to workaround */
s->time_base++; s->time_base++;
s->time+= s->avctx->time_base.den; s->time+= s->avctx->time_base.den;
} }
...@@ -5857,6 +5859,7 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){ ...@@ -5857,6 +5859,7 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){
s->time= (s->last_time_base + time_incr)*s->avctx->time_base.den + time_increment; s->time= (s->last_time_base + time_incr)*s->avctx->time_base.den + time_increment;
s->pb_time= s->pp_time - (s->last_non_b_time - s->time); s->pb_time= s->pp_time - (s->last_non_b_time - s->time);
if(s->pp_time <=s->pb_time || s->pp_time <= s->pp_time - s->pb_time || s->pp_time<=0){ if(s->pp_time <=s->pb_time || s->pp_time <= s->pp_time - s->pb_time || s->pp_time<=0){
/* messed up order, maybe after seeking? skipping current b-frame */
return FRAME_SKIPPED; return FRAME_SKIPPED;
} }
ff_mpeg4_init_direct_mv(s); ff_mpeg4_init_direct_mv(s);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment