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

« back to all changes in this revision

Viewing changes to libavcodec/v210dec.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:
22
22
 */
23
23
 
24
24
#include "avcodec.h"
 
25
#include "internal.h"
25
26
#include "libavutil/bswap.h"
26
27
#include "libavutil/internal.h"
27
28
#include "libavutil/mem.h"
42
43
    return 0;
43
44
}
44
45
 
45
 
static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
 
46
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
46
47
                        AVPacket *avpkt)
47
48
{
48
49
    int h, w;
61
62
    }
62
63
 
63
64
    pic->reference = 0;
64
 
    if (avctx->get_buffer(avctx, pic) < 0)
 
65
    if (ff_get_buffer(avctx, pic) < 0)
65
66
        return -1;
66
67
 
67
68
    y = (uint16_t*)pic->data[0];
108
109
        v += pic->linesize[2] / 2 - avctx->width / 2;
109
110
    }
110
111
 
111
 
    *data_size = sizeof(AVFrame);
 
112
    *got_frame      = 1;
112
113
    *(AVFrame*)data = *avctx->coded_frame;
113
114
 
114
115
    return avpkt->size;