~ubuntu-branches/ubuntu/utopic/libav/utopic

« back to all changes in this revision

Viewing changes to libavcodec/indeo3.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2012-12-21 15:32:13 UTC
  • mto: (1.2.18)
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: package-import@ubuntu.com-20121221153213-fudzrugjzivtv0wp
Tags: upstream-9~beta3
ImportĀ upstreamĀ versionĀ 9~beta3

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
#include "dsputil.h"
36
36
#include "bytestream.h"
37
37
#include "get_bits.h"
 
38
#include "internal.h"
38
39
 
39
40
#include "indeo3data.h"
40
41
 
1024
1025
}
1025
1026
 
1026
1027
 
1027
 
static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
 
1028
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
1028
1029
                        AVPacket *avpkt)
1029
1030
{
1030
1031
    Indeo3DecodeContext *ctx = avctx->priv_data;
1039
1040
    /* skip sync(null) frames */
1040
1041
    if (res) {
1041
1042
        // we have processed 16 bytes but no data was decoded
1042
 
        *data_size = 0;
 
1043
        *got_frame = 0;
1043
1044
        return buf_size;
1044
1045
    }
1045
1046
 
1070
1071
        avctx->release_buffer(avctx, &ctx->frame);
1071
1072
 
1072
1073
    ctx->frame.reference = 0;
1073
 
    if ((res = avctx->get_buffer(avctx, &ctx->frame)) < 0) {
 
1074
    if ((res = ff_get_buffer(avctx, &ctx->frame)) < 0) {
1074
1075
        av_log(ctx->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
1075
1076
        return res;
1076
1077
    }
1085
1086
                 ctx->frame.data[2], ctx->frame.linesize[2],
1086
1087
                 (avctx->height + 3) >> 2);
1087
1088
 
1088
 
    *data_size      = sizeof(AVFrame);
 
1089
    *got_frame = 1;
1089
1090
    *(AVFrame*)data = ctx->frame;
1090
1091
 
1091
1092
    return buf_size;