diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-01-23 14:07:25 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-01-23 14:07:25 +0000 |
commit | e8ea90123d2b99d3fca37a5619fefe03b38763c2 (patch) | |
tree | 8730e454a014bcaa9e7f67dc5919bf32e62032c2 /libavcodec | |
parent | 46f2f05f5999188586b767ffdaae6607a93939c4 (diff) | |
download | ffmpeg-e8ea90123d2b99d3fca37a5619fefe03b38763c2.tar.gz |
framerate check
Originally committed as revision 3869 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpegvideo.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 6b5546cd3a..45c9e566a0 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -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"); |