[FFmpeg-cvslog] audiointerleave: check timebase

Michael Niedermayer git at videolan.org
Sun Apr 1 21:56:33 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Apr  1 21:21:13 2012 +0200| [b3ab337227ec78ba2de24b1f1972e116257e9ebb] | committer: Michael Niedermayer

audiointerleave: check timebase

Replaces FPE by clean error

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b3ab337227ec78ba2de24b1f1972e116257e9ebb
---

 libavformat/audiointerleave.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/libavformat/audiointerleave.c b/libavformat/audiointerleave.c
index 922f4a5..609a511 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;



More information about the ffmpeg-cvslog mailing list