aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h263.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-01-13 02:45:05 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-01-13 02:45:05 +0000
commit2d0bcfb412a618e8130fbfea15df76eb0f7dac45 (patch)
tree29c8493608b12f68d52978980e42a0252706bd72 /libavcodec/h263.c
parent3b6dc9ca6db0d94d0fdad5e36b11a1f5d5ede917 (diff)
downloadffmpeg-2d0bcfb412a618e8130fbfea15df76eb0f7dac45.tar.gz
some interlaced direct sanity checks
Originally committed as revision 7442 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h263.c')
-rw-r--r--libavcodec/h263.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/h263.c b/libavcodec/h263.c
index af5fa50e67..27b66a0c81 100644
--- a/libavcodec/h263.c
+++ b/libavcodec/h263.c
@@ -5928,6 +5928,10 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){
- ROUNDED_DIV(s->last_non_b_time - s->pp_time, s->t_frame))*2;
s->pb_field_time= ( ROUNDED_DIV(s->time, s->t_frame)
- ROUNDED_DIV(s->last_non_b_time - s->pp_time, s->t_frame))*2;
+ if(!s->progressive_sequence){
+ if(s->pp_field_time <= s->pb_field_time || s->pb_field_time <= 1)
+ return FRAME_SKIPPED;
+ }
}
//av_log(s->avctx, AV_LOG_DEBUG, "last nonb %"PRId64" last_base %d time %"PRId64" pp %d pb %d t %d ppf %d pbf %d\n", s->last_non_b_time, s->last_time_base, s->time, s->pp_time, s->pb_time, s->t_frame, s->pp_field_time, s->pb_field_time);