From 58f46542a4d4629050ebc6dfed50f4ec2bcfa0a4 Mon Sep 17 00:00:00 2001 From: jstebbins Date: Mon, 25 Nov 2013 23:45:00 +0000 Subject: [PATCH] libhb: fix fps detection for libav "raw" demuxers Fixes https://forum.handbrake.fr/viewtopic.php?f=11&t=28695&p=133276#p133276 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5904 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/decavcodec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index 846ef757d..8f88267b5 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -1631,7 +1631,10 @@ static void compute_frame_duration( hb_work_private_t *pv ) duration = ( (double)st->duration * (double)st->time_base.num ) / ( (double)st->nb_frames * (double)st->time_base.den ); } - else + // Raw demuxers set a default fps of 25 and do not parse + // a value from the container. So use the codec time_base + // for raw demuxers. + else if (ic->iformat->raw_codec_id == AV_CODEC_ID_NONE) { // XXX We don't have a frame count or duration so try to use the // far less reliable time base info in the stream. -- 2.40.0