]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mpegaudiodecheader.c
mpegvideo_enc: Check AVCodecContext allocation
[ffmpeg] / libavcodec / mpegaudiodecheader.c
index 25e73195b83dffacbef0c042e8fab2583e5e5d53..8efcbe4dabe9f1d04bc324dcc28541be0c605032 100644 (file)
@@ -134,7 +134,8 @@ int avpriv_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_r
         break;
     default:
     case 3:
-        avctx->codec_id = AV_CODEC_ID_MP3;
+        if (avctx->codec_id != AV_CODEC_ID_MP3ADU)
+            avctx->codec_id = AV_CODEC_ID_MP3;
         if (s->lsf)
             *frame_size = 576;
         else