Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 8ca03528f532ab1672e9e908c0f34ab5ef17f6cf Mon Sep 17 00:00:00 2001
- From: Oana Stratulat <[email protected]>
- Date: Thu, 5 Jan 2012 01:08:05 +0200
- Subject: [PATCH] Patch for hang in amrnb decoder. Fixes bug 151
- ---
- libavcodec/amrnbdec.c | 4 ++++
- 1 files changed, 4 insertions(+), 0 deletions(-)
- diff --git a/libavcodec/amrnbdec.c b/libavcodec/amrnbdec.c
- index 926014f..400630b 100644
- --- a/libavcodec/amrnbdec.c
- +++ b/libavcodec/amrnbdec.c
- @@ -977,6 +977,10 @@ static int amrnb_decode_frame(AVCodecContext *avctx, void *data,
- pitch_sharpening(p, subframe, p->cur_frame_mode, &fixed_sparse);
- + if (fixed_sparse.pitch_lag == 0) {
- + av_log(avctx, AV_LOG_ERROR, "the file is corrupted, fixed_sparse.pitch_lag = 0\n");
- + return AVERROR_INVALIDDATA;
- + }
- ff_set_fixed_vector(p->fixed_vector, &fixed_sparse, 1.0,
- AMR_SUBFRAME_SIZE);
- --
- 1.7.5.4
Advertisement
Add Comment
Please, Sign In to add comment