demux_lavf: try harder to make up a frame rate
commit4680beb6dc0cb923cc6bc654e23dd3e007fda413
authorUoti Urpala <uau@mplayer2.org>
Fri, 13 Apr 2012 23:43:40 +0000 (14 02:43 +0300)
committerUoti Urpala <uau@mplayer2.org>
Sat, 14 Apr 2012 00:27:53 +0000 (14 03:27 +0300)
tree06bdc8627d2410217c8539ab98e90f487b767aa4
parent74ad0b42841a4352f2645cf2104268cb8f39992d
demux_lavf: try harder to make up a frame rate

Frame rate information is mostly irrelevant for playback, but it's
needed at least to convert frame numbers used in some subtitle formats
(like MicroDVD) into timestamps. Libavformat stopped making up a frame
rate if no "reliable" information is available (commit 7929e22bd
"lavf: don't guess r_frame_rate from either stream or codec timebase",
1.5 months ago). This caused a regression with AVI files and MicroDVD
subtitles. Add a heuristic similar to what libavformat used to have,
to make up FPS values which should work at least for the AVI+MicroDVD
use case.
libmpdemux/demux_lavf.c