changeset 2860:cf6976fdd05f libavformat

Do not force fps unless the user actually specified one. fixes issue309
author michael
date Wed, 26 Dec 2007 22:28:22 +0000
parents 8490c561d921
children e6e210e4581d
files raw.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/raw.c	Wed Dec 26 22:17:46 2007 +0000
+++ b/raw.c	Wed Dec 26 22:28:22 2007 +0000
@@ -85,7 +85,10 @@
             av_set_pts_info(st, 64, 1, st->codec->sample_rate);
             break;
         case CODEC_TYPE_VIDEO:
-            av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den);
+            if(ap->time_base.num)
+                av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den);
+            else
+                av_set_pts_info(st, 64, 1, 25);
             st->codec->width = ap->width;
             st->codec->height = ap->height;
             st->codec->pix_fmt = ap->pix_fmt;