| Submitter | Michael Niedermayer |
|---|---|
| Date | March 23, 2012, 10:25 a.m. |
| Message ID | <20120323102550.333F3148C8F@albiero.videolan.org> |
| Download | mbox | patch |
| Permalink | /patch/19438/ |
| State | New |
| Headers | show |
Comments
Patch
diff --git a/ffmpeg.c b/ffmpeg.c index 0f6bc30..9fd6b42 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -2007,6 +2007,10 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output) if (ret < 0) { return ret; } + if (avctx->sample_rate <= 0) { + av_log(avctx, AV_LOG_ERROR, "Sample rate %d invalid\n", avctx->sample_rate); + return AVERROR_INVALIDDATA; + } if (!*got_output) { /* no audio frame */