git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9578 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
michael 2003-03-13 09:24:03 +00:00
parent 8bd3a05ea7
commit 2884aed1ce
1 changed files with 16 additions and 2 deletions

View File

@ -62,12 +62,22 @@ static int config(struct vf_instance_s* vf,
switch(height){ switch(height){
case 240: case 240:
case 480: case 480:
#if LIBAVCODEC_BUILD >= 4662
lavc_venc_context.frame_rate = 30000;
lavc_venc_context.frame_rate_base= 1001;
#else
lavc_venc_context.frame_rate=29.97*FRAME_RATE_BASE; // NTSC lavc_venc_context.frame_rate=29.97*FRAME_RATE_BASE; // NTSC
#endif
break; break;
case 576: case 576:
case 288: case 288:
default: default:
#if LIBAVCODEC_BUILD >= 4662
lavc_venc_context.frame_rate = 25;
lavc_venc_context.frame_rate_base= 1;
#else
lavc_venc_context.frame_rate=25*FRAME_RATE_BASE; // PAL lavc_venc_context.frame_rate=25*FRAME_RATE_BASE; // PAL
#endif
break; break;
// lavc_venc_context.frame_rate=vo_fps*FRAME_RATE_BASE; // same as src // lavc_venc_context.frame_rate=vo_fps*FRAME_RATE_BASE; // same as src
} }
@ -174,8 +184,12 @@ static int open(vf_instance_t *vf, char* args){
// fixed bitrate (in kbits) // fixed bitrate (in kbits)
lavc_venc_context.bit_rate = 1000*p_quality; lavc_venc_context.bit_rate = 1000*p_quality;
} }
#if LIBAVCODEC_BUILD >= 4662
lavc_venc_context.frame_rate_base = 1000*1001;
lavc_venc_context.frame_rate = (p_fps<1.0) ? 0 : (p_fps * lavc_venc_context.frame_rate_base);
#else
lavc_venc_context.frame_rate = (p_fps<1.0) ? 0 : (p_fps * FRAME_RATE_BASE); lavc_venc_context.frame_rate = (p_fps<1.0) ? 0 : (p_fps * FRAME_RATE_BASE);
lavc_venc_context.qmin= 1; #endif
lavc_venc_context.gop_size = 0; // I-only lavc_venc_context.gop_size = 0; // I-only
return 1; return 1;