summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-03-31 21:43:59 +0200
committerwm4 <wm4@nowhere>2016-03-31 21:46:23 +0200
commit38c813c919a2c7d59d6113f16252aa3be96f3fca (patch)
tree095bf19260fb7bf8322522a8f18dbae4b4ff1d69
parent0e7bdce907c0c40ec3c97a387404049a1aaaec7b (diff)
downloadmpv-38c813c919a2c7d59d6113f16252aa3be96f3fca.tar.bz2
mpv-38c813c919a2c7d59d6113f16252aa3be96f3fca.tar.xz
demux_lavf: remove old MicroDVD frame timing guessing
This was changed in 2014, so I suppose users will usually have a FFmpeg release which includes the corresponding upstream change. If not, well too bad for those MicroDVD-obsessed users. Also don't try to retrieve the default framerate as exported by the demuxer, and instead hardcode it and trust it won't ever change. this avoids that we have to deal with a larger mess in the codecpar commit.
-rw-r--r--demux/demux_lavf.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c
index f911f0831b..1c5d0fc05a 100644
--- a/demux/demux_lavf.c
+++ b/demux/demux_lavf.c
@@ -621,12 +621,7 @@ static void handle_new_stream(demuxer_t *demuxer, int i)
if (av_opt_get_q(avfc, "subfps", AV_OPT_SEARCH_CHILDREN, &r) >= 0) {
// File headers don't have a FPS set.
if (r.num < 1 || r.den < 1)
- sh->codec->frame_based = av_q2d(av_inv_q(codec->time_base));
- } else {
- // Older libavformat versions. If the FPS matches the microdvd
- // reader's default, assume it uses frame based timing.
- if (codec->time_base.num == 125 && codec->time_base.den == 2997)
- sh->codec->frame_based = 23.976;
+ sh->codec->frame_based = 23.976; // default timebase
}
}
break;