changeset 10775:35e175942ee2 libavcodec

Add a few explanatory comments to cornercase workarounds.
author diego
date Tue, 05 Jan 2010 10:18:01 +0000
parents fadd5dfac0f0
children 816067b00019
files h263.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/h263.c	Tue Jan 05 01:16:02 2010 +0000
+++ b/h263.c	Tue Jan 05 10:18:01 2010 +0000
@@ -5732,9 +5732,9 @@
 
             if(   h_sampling_factor_n==0 || h_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;
-
                 *gb= bak;
             }else
                 av_log(s->avctx, AV_LOG_ERROR, "scalability not supported\n");
@@ -5847,6 +5847,8 @@
         s->time= s->time_base*s->avctx->time_base.den + time_increment;
         if(s->workaround_bugs&FF_BUG_UMP4){
             if(s->time < s->last_non_b_time){
+                /* header is not mpeg-4-compatible, broken encoder,
+                 * trying to workaround */
                 s->time_base++;
                 s->time+= s->avctx->time_base.den;
             }
@@ -5857,6 +5859,7 @@
         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);
         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;
         }
         ff_mpeg4_init_direct_mv(s);