comparison mencoder.c @ 16827:6cba67a823ec

reverse patch that was mistakenly applied with unwanted unrelated changes
author rfelker
date Sun, 23 Oct 2005 07:30:56 +0000
parents 0c6f6ef27f3f
children d8012b9a754b
comparison
equal deleted inserted replaced
16826:a4d1b7dc44e0 16827:6cba67a823ec
580 sh_video->fps=force_fps; 580 sh_video->fps=force_fps;
581 sh_video->frametime=1.0f/sh_video->fps; 581 sh_video->frametime=1.0f/sh_video->fps;
582 mp_msg(MSGT_MENCODER,MSGL_INFO,MSGTR_ForcingInputFPS, sh_video->fps); 582 mp_msg(MSGT_MENCODER,MSGL_INFO,MSGTR_ForcingInputFPS, sh_video->fps);
583 } 583 }
584 584
585 if(sh_audio && out_file_format==MUXER_TYPE_RAWVIDEO){
586 mp_msg(MSGT_MENCODER,MSGL_ERR,MSGTR_RawvideoDoesNotSupportAudio);
587 sh_audio=NULL;
588 }
585 if(sh_audio && out_audio_codec<0){ 589 if(sh_audio && out_audio_codec<0){
586 if(audio_id==-2) 590 if(audio_id==-2)
587 mp_msg(MSGT_MENCODER,MSGL_ERR,MSGTR_DemuxerDoesntSupportNosound); 591 mp_msg(MSGT_MENCODER,MSGL_ERR,MSGTR_DemuxerDoesntSupportNosound);
588 mp_msg(MSGT_MENCODER,MSGL_FATAL,MSGTR_NoAudioEncoderSelected); 592 mp_msg(MSGT_MENCODER,MSGL_FATAL,MSGTR_NoAudioEncoderSelected);
589 mencoder_exit(1,NULL); 593 mencoder_exit(1,NULL);
1298 if (play_n_frames >= 0) 1302 if (play_n_frames >= 0)
1299 play_n_frames++; 1303 play_n_frames++;
1300 badframes++; 1304 badframes++;
1301 if(skip_flag<=0){ 1305 if(skip_flag<=0){
1302 // unwanted skipping of a frame, what to do? 1306 // unwanted skipping of a frame, what to do?
1303 v_timer_corr-=(float)mux_v->h.dwScale/mux_v->h.dwRate;
1304 #if 0
1305 if(skip_limit==0){ 1307 if(skip_limit==0){
1306 // skipping not allowed -> write empty frame: 1308 // skipping not allowed -> write empty frame:
1307 if (!encode_duplicates || !sh_video->vfilter || ((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter, VFCTRL_DUPLICATE_FRAME, 0) != CONTROL_TRUE) 1309 if (!encode_duplicates || !sh_video->vfilter || ((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter, VFCTRL_DUPLICATE_FRAME, 0) != CONTROL_TRUE)
1308 muxer_write_chunk(mux_v,0,0); 1310 muxer_write_chunk(mux_v,0,0);
1309 } else { 1311 } else {
1310 // skipping allowed -> skip it and distriubute timer error: 1312 // skipping allowed -> skip it and distriubute timer error:
1311 v_timer_corr-=(float)mux_v->h.dwScale/mux_v->h.dwRate; 1313 v_timer_corr-=(float)mux_v->h.dwScale/mux_v->h.dwRate;
1312 } 1314 }
1313 #endif
1314 } 1315 }
1315 } 1316 }
1316 } 1317 }
1317 1318
1318 videosamples++; 1319 videosamples++;