aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-09-10 20:52:40 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-09-10 20:57:23 +0200
commit5829b7d29e34d60aff2319e8b5c296d36c344d23 (patch)
tree13f8b5e95e2084cca4724809e2f5e18d8df16448
parentf0d50500908a67d2ea81d71bae5cb4b0d15ded2c (diff)
downloadffmpeg-5829b7d29e34d60aff2319e8b5c296d36c344d23.tar.gz
ffmpeg: check timebase validity before considering it to be used for stream copy
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--ffmpeg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 9935a1e6d9..18b7383efe 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2055,7 +2055,8 @@ static int transcode_init(void)
&& strcmp(oc->oformat->name, "mov") && strcmp(oc->oformat->name, "mp4") && strcmp(oc->oformat->name, "3gp")
&& strcmp(oc->oformat->name, "3g2") && strcmp(oc->oformat->name, "psp") && strcmp(oc->oformat->name, "ipod")
) {
- if( copy_tb<0 && av_q2d(icodec->time_base)*icodec->ticks_per_frame > av_q2d(ist->st->time_base)
+ if( copy_tb<0 && icodec->time_base.den
+ && av_q2d(icodec->time_base)*icodec->ticks_per_frame > av_q2d(ist->st->time_base)
&& av_q2d(ist->st->time_base) < 1.0/500
|| copy_tb==0){
codec->time_base = icodec->time_base;