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

« back to all changes in this revision

Viewing changes to libavcodec/loco.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:
27
27
#include "avcodec.h"
28
28
#include "get_bits.h"
29
29
#include "golomb.h"
 
30
#include "internal.h"
30
31
#include "mathops.h"
31
32
 
32
33
enum LOCO_MODE {LOCO_UNKN=0, LOCO_CYUY2=-1, LOCO_CRGB=-2, LOCO_CRGBA=-3, LOCO_CYV12=-4,
157
158
}
158
159
 
159
160
static int decode_frame(AVCodecContext *avctx,
160
 
                        void *data, int *data_size,
 
161
                        void *data, int *got_frame,
161
162
                        AVPacket *avpkt)
162
163
{
163
164
    const uint8_t *buf = avpkt->data;
170
171
        avctx->release_buffer(avctx, p);
171
172
 
172
173
    p->reference = 0;
173
 
    if(avctx->get_buffer(avctx, p) < 0){
 
174
    if(ff_get_buffer(avctx, p) < 0){
174
175
        av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
175
176
        return -1;
176
177
    }
222
223
        break;
223
224
    }
224
225
 
225
 
    *data_size = sizeof(AVFrame);
 
226
    *got_frame      = 1;
226
227
    *(AVFrame*)data = l->pic;
227
228
 
228
229
    return buf_size;