summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demux/demux_lavf.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c
index 325747deac..b705452dc8 100644
--- a/demux/demux_lavf.c
+++ b/demux/demux_lavf.c
@@ -458,6 +458,12 @@ static void handle_stream(demuxer_t *demuxer, int i)
memcpy(sh_sub->extradata, codec->extradata, codec->extradata_size);
sh_sub->extradata_len = codec->extradata_size;
}
+
+ // Hack for MicroDVD: if time_base matches the ffmpeg microdvd reader's
+ // default FPS (23.976), assume the MicroDVD file did not declare a
+ // FPS, and the MicroDVD file uses frame based timing.
+ if (codec->time_base.num == 125 && codec->time_base.den == 2997)
+ sh_sub->frame_based = true;
break;
}
case AVMEDIA_TYPE_ATTACHMENT: {