]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/bmv.c
alsdec: channel sorting
[ffmpeg] / libavcodec / bmv.c
index fa44c6ceff8b528261e68569ea5de68df2722bc0..defa1ab88bb99f2123d7b321a54865884f44a10c 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/avassert.h"
 #include "libavutil/channel_layout.h"
 #include "avcodec.h"
 #include "bytestream.h"
-#include "libavutil/avassert.h"
+#include "internal.h"
 
 enum BMVFlags{
     BMV_NOP = 0,
@@ -195,7 +196,8 @@ static int decode_bmv_frame(const uint8_t *source, int src_len, uint8_t *frame,
     return 0;
 }
 
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *pkt)
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
+                        AVPacket *pkt)
 {
     BMVDecContext * const c = avctx->priv_data;
     int type, scr_off;
@@ -244,7 +246,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
         avctx->release_buffer(avctx, &c->pic);
 
     c->pic.reference = 3;
-    if ((ret = avctx->get_buffer(avctx, &c->pic)) < 0) {
+    if ((ret = ff_get_buffer(avctx, &c->pic)) < 0) {
         av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
         return ret;
     }
@@ -266,7 +268,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
         outptr += c->pic.linesize[0];
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = c->pic;
 
     /* always report that the buffer was completely consumed */
@@ -342,7 +344,7 @@ static int bmv_aud_decode_frame(AVCodecContext *avctx, void *data,
 
     /* get output buffer */
     c->frame.nb_samples = total_blocks * 32;
-    if ((ret = avctx->get_buffer(avctx, &c->frame)) < 0) {
+    if ((ret = ff_get_buffer(avctx, &c->frame)) < 0) {
         av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
         return ret;
     }