Commit 542562e5 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/gsm_parser: Replace codec_id check by assert

A parser should never be called with a mismatching codec
Found-by: 's avatarGanesh Ajjanagadde <gajjanag@mit.edu>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 107e54c5
......@@ -25,6 +25,7 @@
* Splits packets into individual blocks.
*/
#include "libavutil/avassert.h"
#include "parser.h"
#include "gsm.h"
......@@ -55,10 +56,7 @@ static int gsm_parse(AVCodecParserContext *s1, AVCodecContext *avctx,
s->duration = GSM_FRAME_SIZE * 2;
break;
default:
*poutbuf = buf;
*poutbuf_size = buf_size;
av_log(avctx, AV_LOG_ERROR, "Invalid codec_id\n");
return buf_size;
av_assert0(0);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment