From b3ab337227ec78ba2de24b1f1972e116257e9ebb Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 1 Apr 2012 21:21:13 +0200 Subject: [PATCH] audiointerleave: check timebase Replaces FPE by clean error Signed-off-by: Michael Niedermayer --- libavformat/audiointerleave.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/audiointerleave.c b/libavformat/audiointerleave.c index 922f4a5880..609a5117a3 100644 --- a/libavformat/audiointerleave.c +++ b/libavformat/audiointerleave.c @@ -47,6 +47,10 @@ int ff_audio_interleave_init(AVFormatContext *s, if (!samples_per_frame) return -1; + if (!time_base.num) { + av_log(s, AV_LOG_ERROR, "timebase not set for audio interleave\n"); + return -1; + } for (i = 0; i < s->nb_streams; i++) { AVStream *st = s->streams[i]; AudioInterleaveContext *aic = st->priv_data;