]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ra144dec.c
vc1dec: prevent v_edge_pos from becoming negative.
[ffmpeg] / libavcodec / ra144dec.c
index 9d44776d2e53c2ef0ac4e49d79b6464e8137e356..b0e2498f40e9522389c3e5fa2f5a07dc772e4ca4 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/channel_layout.h"
 #include "libavutil/intmath.h"
 #include "avcodec.h"
 #include "get_bits.h"
+#include "internal.h"
 #include "ra144.h"
 
 
@@ -37,7 +39,9 @@ static av_cold int ra144_decode_init(AVCodecContext * avctx)
     ractx->lpc_coef[0] = ractx->lpc_tables[0];
     ractx->lpc_coef[1] = ractx->lpc_tables[1];
 
-    avctx->sample_fmt = AV_SAMPLE_FMT_S16;
+    avctx->channels       = 1;
+    avctx->channel_layout = AV_CH_LAYOUT_MONO;
+    avctx->sample_fmt     = AV_SAMPLE_FMT_S16;
 
     avcodec_get_frame_defaults(&ractx->frame);
     avctx->coded_frame = &ractx->frame;
@@ -77,7 +81,7 @@ static int ra144_decode_frame(AVCodecContext * avctx, void *data,
 
     /* get output buffer */
     ractx->frame.nb_samples = NBLOCKS * BLOCKSIZE;
-    if ((ret = avctx->get_buffer(avctx, &ractx->frame)) < 0) {
+    if ((ret = ff_get_buffer(avctx, &ractx->frame)) < 0) {
         av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
         return ret;
     }