]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/apc.c
add FF_API_ALLOC_FORMAT_CONTEXT define to disable the deprecated
[ffmpeg] / libavformat / apc.c
index 20de1c7e589534b70d60599e4dfe890bc7c4a110..9b4a8adc1d441a080f0fca65937dbab2789ca947 100644 (file)
@@ -43,7 +43,7 @@ static int apc_read_header(AVFormatContext *s, AVFormatParameters *ap)
     if (!st)
         return AVERROR(ENOMEM);
 
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_ADPCM_IMA_WS;
 
     get_le32(pb); /* number of samples */
@@ -62,8 +62,8 @@ static int apc_read_header(AVFormatContext *s, AVFormatParameters *ap)
     if (get_le32(pb))
         st->codec->channels = 2;
 
-    st->codec->bits_per_sample = 4;
-    st->codec->bit_rate = st->codec->bits_per_sample * st->codec->channels
+    st->codec->bits_per_coded_sample = 4;
+    st->codec->bit_rate = st->codec->bits_per_coded_sample * st->codec->channels
                           * st->codec->sample_rate;
     st->codec->block_align = 1;