diff --git a/gst/mpeg4videoparse/mpeg4parse.c b/gst/mpeg4videoparse/mpeg4parse.c index c00c85a6c2..5c8ce9574c 100644 --- a/gst/mpeg4videoparse/mpeg4parse.c +++ b/gst/mpeg4videoparse/mpeg4parse.c @@ -164,8 +164,8 @@ gst_mpeg4_params_parse_vo (MPEG4Params * params, GstBitReader * br) int n; /* Length of the time increment is the minimal number of bits needed to - * represent time_increment_resolution */ - for (n = 0; (time_increment_resolution >> n) != 0; n++); + * represent time_increment_resolution-1 */ + for (n = 0; ((time_increment_resolution - 1) >> n) != 0; n++); GET_BITS (br, n, &bits); fixed_time_increment = bits;