diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-12-27 20:00:10 +0100 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-12-28 10:24:15 +0100 |
commit | 50401f5fb7d778583b03a13bc4440f71063d319d (patch) | |
tree | 7c1f8595fe83e184a2f2328f1076f8c26b28fed0 /libavcodec/libzvbi-teletextdec.c | |
parent | 3c6781b48acd4eda5f0c5edbdcb547477312d684 (diff) | |
download | ffmpeg-50401f5fb7d778583b03a13bc4440f71063d319d.tar.gz |
avcodec: properly check pkt_timebase for validity
Unset/invalid timebases have a zero numerator.
This makes the checks consistent with other timebase checks and fixes an
integer division by 0.
Diffstat (limited to 'libavcodec/libzvbi-teletextdec.c')
-rw-r--r-- | libavcodec/libzvbi-teletextdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/libzvbi-teletextdec.c b/libavcodec/libzvbi-teletextdec.c index ff968ad29c..4e59531216 100644 --- a/libavcodec/libzvbi-teletextdec.c +++ b/libavcodec/libzvbi-teletextdec.c @@ -412,7 +412,7 @@ static int teletext_decode_frame(AVCodecContext *avctx, void *data, int *data_si } } - if (avctx->pkt_timebase.den && pkt->pts != AV_NOPTS_VALUE) + if (avctx->pkt_timebase.num && pkt->pts != AV_NOPTS_VALUE) ctx->pts = av_rescale_q(pkt->pts, avctx->pkt_timebase, AV_TIME_BASE_Q); if (pkt->size) { |