]> git.sesse.net Git - ffmpeg/commit
libx264: Don't leave max_b_frames as -1 if the user didn't set it
authorMartin Storsjö <martin@martin.st>
Fri, 13 Jan 2012 21:41:16 +0000 (23:41 +0200)
committerMartin Storsjö <martin@martin.st>
Sat, 14 Jan 2012 00:08:42 +0000 (02:08 +0200)
commit57facb73ab940b1117c22ef9b70a6e5ec237112d
treebeb0d0d4c60f2ca15bb4ec1c2967e9ca34492709
parent4c82c6d9932bfdb1a9eb288d566ded9d40ca5e24
libx264: Don't leave max_b_frames as -1 if the user didn't set it

max_b_frames is initialized to -1 for libx264, to allow
distinguishing between an explicit user set 0 and a default not
touched 0 (see bb73cda2).

If max_b_frames is left as -1, this affects dts generation (where
expressions like max_b_frames != 0 are used), so make sure it is
left at the default 0 after the libx264 init function returns.

This avoids unnecessarily producing dts != pts when using
profile=baseline.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavcodec/libx264.c