mirror of
https://github.com/mpv-player/mpv
synced 2025-03-03 04:37:54 +00:00
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
This commit is contained in:
parent
78a2f98144
commit
b764f8e751
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user