mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
framerate check
Originally committed as revision 3869 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
46f2f05f59
commit
e8ea90123d
@ -1049,6 +1049,11 @@ int MPV_encode_init(AVCodecContext *avctx)
|
||||
if(s->avctx->thread_count > 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);
|
||||
if(i > 1){
|
||||
av_log(avctx, AV_LOG_INFO, "removing common factors from framerate\n");
|
||||
|
Loading…
Reference in New Issue
Block a user