http: Add the trailing endlines if they are missing
[ffmpeg.git] / libavformat / aiffdec.c
index 3e41406..04cca5d 100644 (file)
 #define AIFF                    0
 #define AIFF_C_VERSION1         0xA2805140
 
-typedef struct {
+typedef struct AIFFInputContext {
     int64_t data_end;
     int block_duration;
 } AIFFInputContext;
 
-static enum CodecID aiff_codec_get_id(int bps)
+static enum AVCodecID aiff_codec_get_id(int bps)
 {
     if (bps <= 8)
-        return CODEC_ID_PCM_S8;
+        return AV_CODEC_ID_PCM_S8;
     if (bps <= 16)
-        return CODEC_ID_PCM_S16BE;
+        return AV_CODEC_ID_PCM_S16BE;
     if (bps <= 24)
-        return CODEC_ID_PCM_S24BE;
+        return AV_CODEC_ID_PCM_S24BE;
     if (bps <= 32)
-        return CODEC_ID_PCM_S32BE;
+        return AV_CODEC_ID_PCM_S32BE;
 
     /* bigger than 32 isn't allowed  */
-    return CODEC_ID_NONE;
+    return AV_CODEC_ID_NONE;
 }
 
 /* returns the size of the found tag */
@@ -117,32 +117,32 @@ static unsigned int get_aiff_header(AVFormatContext *s, int size,
         size -= 4;
     }
 
-    if (version != AIFF_C_VERSION1 || codec->codec_id == CODEC_ID_PCM_S16BE) {
+    if (version != AIFF_C_VERSION1 || codec->codec_id == AV_CODEC_ID_PCM_S16BE) {
         codec->codec_id = aiff_codec_get_id(codec->bits_per_coded_sample);
         codec->bits_per_coded_sample = av_get_bits_per_sample(codec->codec_id);
         aiff->block_duration = 1;
     } else {
         switch (codec->codec_id) {
-        case CODEC_ID_PCM_F32BE:
-        case CODEC_ID_PCM_F64BE:
-        case CODEC_ID_PCM_S16LE:
-        case CODEC_ID_PCM_ALAW:
-        case CODEC_ID_PCM_MULAW:
+        case AV_CODEC_ID_PCM_F32BE:
+        case AV_CODEC_ID_PCM_F64BE:
+        case AV_CODEC_ID_PCM_S16LE:
+        case AV_CODEC_ID_PCM_ALAW:
+        case AV_CODEC_ID_PCM_MULAW:
             aiff->block_duration = 1;
             break;
-        case CODEC_ID_ADPCM_IMA_QT:
+        case AV_CODEC_ID_ADPCM_IMA_QT:
             codec->block_align = 34*codec->channels;
             break;
-        case CODEC_ID_MACE3:
+        case AV_CODEC_ID_MACE3:
             codec->block_align = 2*codec->channels;
             break;
-        case CODEC_ID_MACE6:
+        case AV_CODEC_ID_MACE6:
             codec->block_align = 1*codec->channels;
             break;
-        case CODEC_ID_GSM:
+        case AV_CODEC_ID_GSM:
             codec->block_align = 33;
             break;
-        case CODEC_ID_QCELP:
+        case AV_CODEC_ID_QCELP:
             codec->block_align = 35;
             break;
         default:
@@ -259,7 +259,7 @@ static int aiff_read_header(AVFormatContext *s)
         case MKTAG('w', 'a', 'v', 'e'):
             if ((uint64_t)size > (1<<30))
                 return -1;
-            st->codec->extradata = av_mallocz(size + FF_INPUT_BUFFER_PADDING_SIZE);
+            st->codec->extradata = av_mallocz(size + AV_INPUT_BUFFER_PADDING_SIZE);
             if (!st->codec->extradata)
                 return AVERROR(ENOMEM);
             st->codec->extradata_size = size;