]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/shorten.c
Factorise enum of AC3 error types to be usable by AAC in the ADTS patch that
[ffmpeg] / libavcodec / shorten.c
index 7516c65f3eb49328b076da9b71abebcf72879796..6d0aace596b9dea228904d86f0b06a2187f412a5 100644 (file)
@@ -104,6 +104,7 @@ static av_cold int shorten_decode_init(AVCodecContext * avctx)
 {
     ShortenContext *s = avctx->priv_data;
     s->avctx = avctx;
+    avctx->sample_fmt = SAMPLE_FMT_S16;
 
     return 0;
 }
@@ -227,9 +228,9 @@ static int decode_wave_header(AVCodecContext *avctx, uint8_t *header, int header
     avctx->sample_rate = get_le32(&hb);
     avctx->bit_rate = get_le32(&hb) * 8;
     avctx->block_align = get_le16(&hb);
-    avctx->bits_per_sample = get_le16(&hb);
+    avctx->bits_per_coded_sample = get_le16(&hb);
 
-    if (avctx->bits_per_sample != 16) {
+    if (avctx->bits_per_coded_sample != 16) {
         av_log(avctx, AV_LOG_ERROR, "unsupported number of bits per sample\n");
         return -1;
     }