]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/nellymoserdec.c
flashsv: use skip_bits_long() where required
[ffmpeg] / libavcodec / nellymoserdec.c
index c177f60ca95d92faf2fffdf3a18d9454c898a0cd..dfbb41caf4fcb0387ee472e08263adc31bb5e45e 100644 (file)
@@ -50,7 +50,6 @@ typedef struct NellyMoserDecodeContext {
     float           scale_bias;
     DSPContext      dsp;
     MDCTContext     imdct_ctx;
-    DECLARE_ALIGNED_16(float,imdct_tmp[NELLY_BUF_LEN]);
     DECLARE_ALIGNED_16(float,imdct_out[NELLY_BUF_LEN * 2]);
 } NellyMoserDecodeContext;
 
@@ -120,8 +119,7 @@ static void nelly_decode_block(NellyMoserDecodeContext *s,
         memset(&aptr[NELLY_FILL_LEN], 0,
                (NELLY_BUF_LEN - NELLY_FILL_LEN) * sizeof(float));
 
-        s->imdct_ctx.fft.imdct_calc(&s->imdct_ctx, s->imdct_out,
-                                    aptr, s->imdct_tmp);
+        ff_imdct_calc(&s->imdct_ctx, s->imdct_out, aptr);
         /* XXX: overlapping and windowing should be part of a more
            generic imdct function */
         overlap_and_window(s, s->state, aptr, s->imdct_out);
@@ -149,6 +147,8 @@ static av_cold int decode_init(AVCodecContext * avctx) {
     if (!sine_window[0])
         ff_sine_window_init(sine_window, 128);
 
+    avctx->sample_fmt = SAMPLE_FMT_S16;
+    avctx->channel_layout = CH_LAYOUT_MONO;
     return 0;
 }
 
@@ -174,7 +174,7 @@ static int decode_tag(AVCodecContext * avctx,
         case 512:   // 44100Hz
             blocks = 8; break;
         default:
-            av_log(avctx, AV_LOG_ERROR, "Tag size %d unknown, report sample!\n", buf_size);
+            av_log(avctx, AV_LOG_DEBUG, "Tag size %d.\n", buf_size);
             return buf_size;
     }