mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 16:21:17 +00:00
mpeg4videoparse: fix number of bytes read for fixed time increment
The spec I found says "16 bits". The existing code used log2(somevalue)+1. ffmpeg uses log2(somevalue-1)+1. The code now uses log2(somevalue-1)+1, and this makes it work with some sample video without breaking another sample. Now, I'm far from certain I've got the right spec, I found it by searching the internet, so... https://bugzilla.gnome.org/show_bug.cgi?id=654666
This commit is contained in:
parent
f1a4791f74
commit
4735a7554b
1 changed files with 2 additions and 2 deletions
|
@ -164,8 +164,8 @@ gst_mpeg4_params_parse_vo (MPEG4Params * params, GstBitReader * br)
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
/* Length of the time increment is the minimal number of bits needed to
|
/* Length of the time increment is the minimal number of bits needed to
|
||||||
* represent time_increment_resolution */
|
* represent time_increment_resolution-1 */
|
||||||
for (n = 0; (time_increment_resolution >> n) != 0; n++);
|
for (n = 0; ((time_increment_resolution - 1) >> n) != 0; n++);
|
||||||
GET_BITS (br, n, &bits);
|
GET_BITS (br, n, &bits);
|
||||||
|
|
||||||
fixed_time_increment = bits;
|
fixed_time_increment = bits;
|
||||||
|
|
Loading…
Reference in a new issue