aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2009-07-02 12:47:58 +0000
committerMichael Niedermayer <michaelni@gmx.at>2009-07-02 12:47:58 +0000
commite7e5d1e990a2e67a3fddbacb93125ee402d7b21b (patch)
treea6350db8c562e2a05d52d62313f6a95cd3b55fe7
parentd218a86a0da7b2630828d31393d52295f0e311e9 (diff)
downloadffmpeg-e7e5d1e990a2e67a3fddbacb93125ee402d7b21b.tar.gz
If either of num or den is 0 make both 0 in av_set_pts_info().
Originally committed as revision 19326 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/utils.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index d7bc23f3c9..cd189712c0 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3313,4 +3313,7 @@ void av_set_pts_info(AVStream *s, int pts_wrap_bits,
av_log(NULL, AV_LOG_DEBUG, "st:%d removing common factor %d from timebase\n", s->index, pts_num/s->time_base.num);
}else
av_log(NULL, AV_LOG_WARNING, "st:%d has too large timebase, reducing\n", s->index);
+
+ if(!s->time_base.num || !s->time_base.den)
+ s->time_base.num= s->time_base.den= 0;
}