vlc | branch: master | Rafaël Carré <[email protected]> | Sat Apr  5 11:47:33 
2014 +0200| [eadc6196df90f5294bbcff2bb9e0a0375c851979] | committer: Rafaël Carré

x265: default to 25fps if frame rate is not set

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=eadc6196df90f5294bbcff2bb9e0a0375c851979
---

 modules/codec/x265.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/modules/codec/x265.c b/modules/codec/x265.c
index 5cb1e64..95edf7f 100644
--- a/modules/codec/x265.c
+++ b/modules/codec/x265.c
@@ -170,9 +170,17 @@ static int  Open (vlc_object_t *p_this)
 #if X265_BUILD >= 6
     param->fpsNum = p_enc->fmt_in.video.i_frame_rate;
     param->fpsDenom = p_enc->fmt_in.video.i_frame_rate_base;
+    if (!param->fpsNum) {
+        param->fpsNum = 25;
+        param->fpsDenom = 1;
+    }
 #else
-    param->frameRate = p_enc->fmt_in.video.i_frame_rate /
+    if (p_enc->fmt_in.video.i_frame_rate_base) {
+        param->frameRate = p_enc->fmt_in.video.i_frame_rate /
             p_enc->fmt_in.video.i_frame_rate_base;
+    } else {
+        param->frameRate = 25;
+    }
 #endif
     param->sourceWidth = p_enc->fmt_in.video.i_visible_width;
     param->sourceHeight = p_enc->fmt_in.video.i_visible_height;

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to