* 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,
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;
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;
}
outptr += c->pic.linesize[0];
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = c->pic;
/* always report that the buffer was completely consumed */
/* 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;
}