]> granicus.if.org Git - handbrake/commitdiff
libhb: fix fps detection for libav "raw" demuxers
authorjstebbins <jstebbins.hb@gmail.com>
Mon, 25 Nov 2013 23:45:00 +0000 (23:45 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Mon, 25 Nov 2013 23:45:00 +0000 (23:45 +0000)
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

index 846ef757dcd50e30320e5c70b0972f3cb4577b8a..8f88267b57b0a2a7bc40b0aa4e803186a8285ad3 100644 (file)
@@ -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.