[Mplayer-cvslog] CVS: main mencoder.c,1.49,1.50

Alex Beregszaszi alex at mplayer.dev.hu
Mon Dec 24 11:54:14 CET 2001


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv14694

Modified Files:
	mencoder.c 
Log Message:
supporting -ofps by lavc, using avcodec_find_encoder_by_name (latest libavcodec cvs)

Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- mencoder.c	24 Dec 2001 02:11:49 -0000	1.49
+++ mencoder.c	24 Dec 2001 10:54:11 -0000	1.50
@@ -807,7 +807,7 @@
 	avcodec_inited=1;
     }
     
-#if 1
+#if 0
     {
 	extern AVCodec *first_avcodec;
 	AVCodec *p = first_avcodec;
@@ -836,13 +836,14 @@
     
 //    lavc_venc_context.width = mux_v->bih->biWidth;
 //    lavc_venc_context.height = mux_v->bih->biHeight;
+    /* scaling only for YV12 (and lavc supports only YV12 ;) */
     lavc_venc_context.width = vo_w;
     lavc_venc_context.height = vo_h;
     if (lavc_param_vbitrate >= 0) /* != -1 */
 	lavc_venc_context.bit_rate = lavc_param_vbitrate;
     else
 	lavc_venc_context.bit_rate = 800000; /* default */
-    lavc_venc_context.frame_rate = sh_video->fps * FRAME_RATE_BASE;    
+    lavc_venc_context.frame_rate = (float)(force_ofps?force_ofps:sh_video->fps) * FRAME_RATE_BASE;
     /* keyframe interval */
     if (lavc_param_keyint >= 0) /* != -1 */
 	lavc_venc_context.gop_size = lavc_param_keyint;




More information about the MPlayer-cvslog mailing list