oanastratulat

Untitled

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