changeset 2450:e248c6250232 libavcodec

framerate check
author michael
date Sun, 23 Jan 2005 14:07:25 +0000
parents 6f719184e2b9
children 0fcee7879d3f
files mpegvideo.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mpegvideo.c	Sun Jan 23 14:03:13 2005 +0000
+++ b/mpegvideo.c	Sun Jan 23 14:07:25 2005 +0000
@@ -1049,6 +1049,11 @@
     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");