summaryrefslogtreecommitdiffstats
path: root/mencoder.c
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-24 10:54:11 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-24 10:54:11 +0000
commitb764f8e7512890aafddcd1e0ee0020181976dc93 (patch)
tree376e8823f6fc1bb265e9aeab25a8dddf2c914df3 /mencoder.c
parent78a2f98144ab818ff99ced77c7246c206635f5e4 (diff)
downloadmpv-b764f8e7512890aafddcd1e0ee0020181976dc93.tar.bz2
mpv-b764f8e7512890aafddcd1e0ee0020181976dc93.tar.xz
supporting -ofps by lavc, using avcodec_find_encoder_by_name (latest libavcodec cvs)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3703 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mencoder.c')
-rw-r--r--mencoder.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mencoder.c b/mencoder.c
index 5a87fdfec1..29f1ebb763 100644
--- a/mencoder.c
+++ b/mencoder.c
@@ -807,7 +807,7 @@ case VCODEC_LIBAVCODEC:
avcodec_inited=1;
}
-#if 1
+#if 0
{
extern AVCodec *first_avcodec;
AVCodec *p = first_avcodec;
@@ -836,13 +836,14 @@ case VCODEC_LIBAVCODEC:
// 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;