summaryrefslogtreecommitdiff
path: root/libavcodec/h263.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2002-09-26 23:27:22 +0000
committerMichael Niedermayer <michaelni@gmx.at>2002-09-26 23:27:22 +0000
commit0c2dd16eb65bb0ade97346aabecc4762f6bcac31 (patch)
tree3ab7efaa5ba31fd757c4b0a2f95a690397937a2c /libavcodec/h263.c
parent7f2bdb62d48886c62aadfdf0c1890a44d935c56d (diff)
autodetect UMP4 (by adding a fourcc field to AVCodecContext)
Originally committed as revision 974 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h263.c')
-rw-r--r--libavcodec/h263.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/libavcodec/h263.c b/libavcodec/h263.c
index 86a6f071ef..a6d73d2089 100644
--- a/libavcodec/h263.c
+++ b/libavcodec/h263.c
@@ -4162,7 +4162,7 @@ int mpeg4_decode_picture_header(MpegEncContext * s)
if( h_sampling_factor_n==0 || h_sampling_factor_m==0
|| v_sampling_factor_n==0 || v_sampling_factor_m==0 || s->workaround_bugs==1){
- fprintf(stderr, "illegal scalability header (VERY broken encoder), trying to workaround\n");
+// fprintf(stderr, "illegal scalability header (VERY broken encoder), trying to workaround\n");
s->scalability=0;
s->gb= bak;
@@ -4231,10 +4231,12 @@ int mpeg4_decode_picture_header(MpegEncContext * s)
s->last_time_base= s->time_base;
s->time_base+= time_incr;
s->time= s->time_base*s->time_increment_resolution + time_increment;
- if(s->time < s->last_non_b_time && s->workaround_bugs==3){
- fprintf(stderr, "header is not mpeg4 compatible, broken encoder, trying to workaround\n");
- s->time_base++;
- s->time+= s->time_increment_resolution;
+ if(s->workaround_bugs==3 || s->avctx->fourcc== 'U' + ('M'<<8) + ('P'<<16) + ('4'<<24)){
+ if(s->time < s->last_non_b_time){
+// fprintf(stderr, "header is not mpeg4 compatible, broken encoder, trying to workaround\n");
+ s->time_base++;
+ s->time+= s->time_increment_resolution;
+ }
}
s->pp_time= s->time - s->last_non_b_time;
s->last_non_b_time= s->time;