* modules/stream_out/transcode.c: try more sensible width/height values when testing...
authorGildas Bazin <gbazin@videolan.org>
Thu, 15 Apr 2004 19:12:20 +0000 (19:12 +0000)
committerGildas Bazin <gbazin@videolan.org>
Thu, 15 Apr 2004 19:12:20 +0000 (19:12 +0000)
modules/stream_out/transcode.c

index 9c2f411..f85b7a9 100644 (file)
@@ -1219,8 +1219,10 @@ static int transcode_video_ffmpeg_new( sout_stream_t *p_stream,
 
     /* The dimensions will be set properly later on.
      * Just put sensible values so we can test if there is an encoder. */
-    id->p_encoder->fmt_in.video.i_width = 16;
-    id->p_encoder->fmt_in.video.i_height = 16;
+    id->p_encoder->fmt_in.video.i_width =
+        id->f_src.video.i_width ?  id->f_src.video.i_width : 16;
+    id->p_encoder->fmt_in.video.i_height =
+        id->f_src.video.i_height ? id->f_src.video.i_height : 16;
 
     id->p_encoder->fmt_in.video.i_frame_rate = 25; /* FIXME as it break mpeg */
     id->p_encoder->fmt_in.video.i_frame_rate_base= 1;