summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg4videodec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-02-08 00:43:15 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-02-08 00:43:15 +0000
commitb317567cf437a515acf75abee2a3bb7a6b047938 (patch)
tree5b5d8415067fcb2c972063d5265b25827269a28f /libavcodec/mpeg4videodec.c
parent055a6aa76a84ced5bebf988ef67e22ac3c5763c5 (diff)
Change xvid/divx/lavc build variables to be consistent to x264_build.
Originally committed as revision 21682 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpeg4videodec.c')
-rw-r--r--libavcodec/mpeg4videodec.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index a1786e822f..7dadf7e99a 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -2079,7 +2079,7 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){
}
/* detect buggy encoders which don't set the low_delay flag (divx4/xvid/opendivx)*/
// note we cannot detect divx5 without b-frames easily (although it's buggy too)
- if(s->vo_type==0 && s->vol_control_parameters==0 && s->divx_version==0 && s->picture_number==0){
+ if(s->vo_type==0 && s->vol_control_parameters==0 && s->divx_version==-1 && s->picture_number==0){
av_log(s->avctx, AV_LOG_ERROR, "looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag\n");
s->low_delay=1;
}
@@ -2118,7 +2118,7 @@ int ff_mpeg4_decode_picture_header(MpegEncContext * s, GetBitContext *gb)
startcode = 0xff;
for(;;) {
if(get_bits_count(gb) >= gb->size_in_bits){
- if(gb->size_in_bits==8 && (s->divx_version || s->xvid_build)){
+ if(gb->size_in_bits==8 && (s->divx_version>=0 || s->xvid_build>=0)){
av_log(s->avctx, AV_LOG_ERROR, "frame skip %d\n", gb->size_in_bits);
return FRAME_SKIPPED; //divx bug
}else
@@ -2194,6 +2194,11 @@ static av_cold int decode_init(AVCodecContext *avctx)
int ret;
static int done = 0;
+ s->divx_version=
+ s->divx_build=
+ s->xvid_build=
+ s->lavc_build= -1;
+
if((ret=ff_h263_decode_init(avctx)) < 0)
return ret;