]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mace.c
Check for several overreads, fixes issue 2512.
[ffmpeg] / libavcodec / mace.c
index ae7b4dc83323e6992024666c33b44a45efde1bdd..c4c43f6184ecd602101ac81e62b9cbe2bb2fb383 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 /**
- * @file libavcodec/mace.c
+ * @file
  * MACE decoder.
  */
 
@@ -230,7 +230,7 @@ static av_cold int mace_decode_init(AVCodecContext * avctx)
 {
     if (avctx->channels > 2)
         return -1;
-    avctx->sample_fmt = SAMPLE_FMT_S16;
+    avctx->sample_fmt = AV_SAMPLE_FMT_S16;
     return 0;
 }
 
@@ -281,7 +281,7 @@ static int mace_decode_frame(AVCodecContext *avctx,
 
 AVCodec mace3_decoder = {
     "mace3",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_MACE3,
     sizeof(MACEContext),
     mace_decode_init,
@@ -293,7 +293,7 @@ AVCodec mace3_decoder = {
 
 AVCodec mace6_decoder = {
     "mace6",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_MACE6,
     sizeof(MACEContext),
     mace_decode_init,