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.
This commit is contained in:
wm4 2016-03-31 21:43:59 +02:00
parent 0e7bdce907
commit 38c813c919
1 changed files with 1 additions and 6 deletions

View File

@ -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) { if (av_opt_get_q(avfc, "subfps", AV_OPT_SEARCH_CHILDREN, &r) >= 0) {
// File headers don't have a FPS set. // File headers don't have a FPS set.
if (r.num < 1 || r.den < 1) if (r.num < 1 || r.den < 1)
sh->codec->frame_based = av_q2d(av_inv_q(codec->time_base)); sh->codec->frame_based = 23.976; // default timebase
} 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;
} }
} }
break; break;