Commit 0393f1e4 authored by michael's avatar michael

framerate check


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3869 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 51c84707
...@@ -1049,6 +1049,11 @@ int MPV_encode_init(AVCodecContext *avctx) ...@@ -1049,6 +1049,11 @@ int MPV_encode_init(AVCodecContext *avctx)
if(s->avctx->thread_count > 1) if(s->avctx->thread_count > 1)
s->rtp_mode= 1; s->rtp_mode= 1;
if(!avctx->frame_rate || !avctx->frame_rate_base){
av_log(avctx, AV_LOG_ERROR, "framerate not set\n");
return -1;
}
i= ff_gcd(avctx->frame_rate, avctx->frame_rate_base); i= ff_gcd(avctx->frame_rate, avctx->frame_rate_base);
if(i > 1){ if(i > 1){
av_log(avctx, AV_LOG_INFO, "removing common factors from framerate\n"); av_log(avctx, AV_LOG_INFO, "removing common factors from framerate\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment