From 73514431d522455f0483f5ff947c10ea0fa60f40 Mon Sep 17 00:00:00 2001
From: Daniel Kang <daniel.d.kang@gmail.com>
Date: Sat, 1 Jan 2011 13:44:43 -0500
Subject: [PATCH] mkv crash fix

---
 ffmpeg.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 87f6d99..32081fa 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1554,7 +1554,7 @@ static int output_packet(AVInputStream *ist, int ist_index,
                         goto discard_packet;
                     }
                     ist->next_pts = ist->pts = guess_correct_pts(&ist->pts_ctx, picture.reordered_opaque, ist->pts);
-                    if (ist->st->codec->time_base.num != 0) {
+                    if (ist->st->codec->time_base.num != 0 && ist->st->codec->time_base.den != 0) {
                         int ticks= ist->st->parser ? ist->st->parser->repeat_pict+1 : ist->st->codec->ticks_per_frame;
                         ist->next_pts += ((int64_t)AV_TIME_BASE *
                                           ist->st->codec->time_base.num * ticks) /
--
1.7.2.2

