[vlc-commits] transcode: video: Provide a default frame rate when probing encoders

Hugo Beauzée-Luyssen git at videolan.org
Wed Aug 23 17:39:29 CEST 2017


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Aug 23 11:14:19 2017 +0200| [5d1a7f7066e062ef054bc15cf7d4ccbac4c647a1] | committer: Hugo Beauzée-Luyssen

transcode: video: Provide a default frame rate when probing encoders

Not providing the framerate will cause some encoders to fail while they
could support the requested operation.

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

 modules/stream_out/transcode/video.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index de36922b87..778fb00dfd 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -224,6 +224,9 @@ static int transcode_video_new( sout_stream_t *p_stream, sout_stream_id_sys_t *i
           ? id->p_encoder->fmt_out.video.i_visible_height
           : id->p_decoder->fmt_in.video.i_visible_height
             ? id->p_decoder->fmt_in.video.i_visible_height : id->p_encoder->fmt_in.video.i_height;
+    /* The same goes with frame rate. Some encoders need it to be initialized */
+    id->p_encoder->fmt_in.video.i_frame_rate = ENC_FRAMERATE;
+    id->p_encoder->fmt_in.video.i_frame_rate_base = ENC_FRAMERATE_BASE;
 
     id->p_encoder->i_threads = p_sys->i_threads;
     id->p_encoder->p_cfg = p_sys->p_video_cfg;



More information about the vlc-commits mailing list