}
static int decode_frame(AVCodecContext *avctx, void *data,
- int *data_size, AVPacket *avpkt)
+ int *got_frame, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
p->key_frame = p->pict_type == AV_PICTURE_TYPE_I;
*picture = *p;
- *data_size = sizeof(AVPicture);
+ *got_frame = 1;
emms_c();
*
*/
static int decode_frame(AVCodecContext *avctx, void *data,
- int *data_size, AVPacket *avpkt)
+ int *got_frame, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
memcpy (c->pic.data[1], c->pal, AVPALETTE_SIZE);
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = c->pic;
/* always report that the buffer was completely consumed */
}
static int aasc_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
return -1;
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->frame;
/* report that the buffer was completely consumed */
}
static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
AnmContext *s = avctx->priv_data;
memcpy(s->frame.data[1], s->palette, AVPALETTE_SIZE);
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->frame;
return buf_size;
}
}
static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
AnsiContext *s = avctx->priv_data;
buf++;
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->frame;
return buf_size;
}
}
static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
}
*picture = a->picture;
- *data_size = sizeof(AVPicture);
+ *got_frame = 1;
emms_c();
}
static int aura_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *pkt)
{
AuraDecodeContext *s=avctx->priv_data;
V += s->frame.linesize[2] - (avctx->width >> 1);
}
- *data_size=sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data= s->frame;
return pkt->size;
static int
avs_decode_frame(AVCodecContext * avctx,
- void *data, int *data_size, AVPacket *avpkt)
+ void *data, int *got_frame, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
const uint8_t *buf_end = avpkt->data + avpkt->size;
}
*picture = avs->picture;
- *data_size = sizeof(AVPicture);
+ *got_frame = 1;
return buf_size;
}
}
static int bethsoftvid_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
BethsoftvidContext * vid = avctx->priv_data;
switch(block_type = bytestream2_get_byte(&vid->g)){
case PALETTE_BLOCK: {
- *data_size = 0;
+ *got_frame = 0;
if ((ret = set_palette(vid)) < 0) {
av_log(avctx, AV_LOG_ERROR, "error reading palette\n");
return ret;
}
end:
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = vid->frame;
return avpkt->size;
}
static int bfi_decode_frame(AVCodecContext *avctx, void *data,
- int *data_size, AVPacket *avpkt)
+ int *got_frame, AVPacket *avpkt)
{
GetByteContext g;
int buf_size = avpkt->size;
src += avctx->width;
dst += bfi->frame.linesize[0];
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame *)data = bfi->frame;
return buf_size;
}
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)
{
BinkContext * const c = avctx->priv_data;
GetBitContext gb;
}
emms_c();
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = c->pic;
if (c->version > 'b')
}
static int bmp_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
}
*picture = s->picture;
- *data_size = sizeof(AVPicture);
+ *got_frame = 1;
return buf_size;
}
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;
outptr += c->pic.linesize[0];
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = c->pic;
/* always report that the buffer was completely consumed */
}
static int decode_frame(AVCodecContext *avctx, void *data,
- int *data_size, AVPacket *avpkt)
+ int *got_frame, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
}
*picture = *newpic;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
return buf_size;
}
h->got_keyframe = 0;
}
-static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size,
+static int cavs_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt) {
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
if (buf_size == 0) {
if (!s->low_delay && h->DPB[0].f.data[0]) {
- *data_size = sizeof(AVPicture);
+ *got_frame = 1;
*picture = h->DPB[0].f;
memset(&h->DPB[0], 0, sizeof(h->DPB[0]));
}
h->got_keyframe = 1;
}
case PIC_PB_START_CODE:
- *data_size = 0;
+ *got_frame = 0;
if(!h->got_keyframe)
break;
init_get_bits(&s->gb, buf_ptr, input_size);
h->stc = stc;
if(decode_pic(h))
break;
- *data_size = sizeof(AVPicture);
+ *got_frame = 1;
if(h->pic_type != AV_PICTURE_TYPE_B) {
if(h->DPB[1].f.data[0]) {
*picture = h->DPB[1].f;
} else {
- *data_size = 0;
+ *got_frame = 0;
}
} else
*picture = h->picture.f;
}
static int cdg_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size, AVPacket *avpkt)
+ void *data, int *got_frame, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
break;
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
} else {
- *data_size = 0;
+ *got_frame = 0;
buf_size = 0;
}
}
static int cdxl_decode_frame(AVCodecContext *avctx, void *data,
- int *data_size, AVPacket *pkt)
+ int *got_frame, AVPacket *pkt)
{
CDXLVideoContext *c = avctx->priv_data;
AVFrame * const p = &c->frame;
} else {
cdxl_decode_rgb(c);
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = c->frame;
return buf_size;
}
static int cinepak_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
if (s->palette_video)
memcpy (s->frame.data[1], s->pal, AVPALETTE_SIZE);
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->frame;
/* report that the buffer was completely consumed */
#if CONFIG_CLJR_DECODER
static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
}
*picture = a->picture;
- *data_size = sizeof(AVPicture);
+ *got_frame = 1;
return buf_size;
}
}
#endif
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt) {
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
}
*picture = c->pic;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
return buf_size;
}
}
static int cyuv_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
}
}
- *data_size=sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data= s->frame;
return buf_size;
};
static int dfa_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
DfaContext *s = avctx->priv_data;
}
memcpy(s->pic.data[1], s->pal, sizeof(s->pal));
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->pic;
return avpkt->size;
return 0;
}
-static int dnxhd_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int dnxhd_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
}
*picture = ctx->picture;
- *data_size = sizeof(AVPicture);
+ *got_frame = 1;
return buf_size;
}
static int decode_frame(AVCodecContext *avctx,
void *data,
- int *data_size,
+ int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
}
*picture = s->picture;
- *data_size = sizeof(AVPicture);
+ *got_frame = 1;
return buf_size;
}
}
static int cinvideo_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
FFSWAP(uint8_t *, cin->bitmap_table[CIN_CUR_BMP], cin->bitmap_table[CIN_PRE_BMP]);
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame *)data = cin->frame;
return buf_size;
/* NOTE: exactly one frame must be given (120000 bytes for NTSC,
144000 bytes for PAL - or twice those for 50Mbps) */
static int dvvideo_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
uint8_t *buf = avpkt->data;
emms_c();
/* return image */
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->picture;
/* Determine the codec's sample_aspect ratio from the packet */
return 0;
}
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
if(c->pic.data[0])
avctx->release_buffer(avctx, &c->pic);
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = c->prev;
/* always report that the buffer was completely consumed */
return 0;
}
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
int h, w;
V += pic->linesize[2];
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = *pic;
return avpkt->size;
#define MVIh_TAG MKTAG('M', 'V', 'I', 'h')
static int cmv_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
cmv_decode_intra(s, buf+2, buf_end);
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->frame;
return buf_size;
}
static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
if (buf_size < 17) {
av_log(avctx, AV_LOG_ERROR, "Input buffer too small\n");
- *data_size = 0;
+ *got_frame = 0;
return -1;
}
for (s->mb_x=0; s->mb_x < (avctx->width +15)/16; s->mb_x++)
decode_mb(s, inter);
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->frame;
if (chunk_type != MADe_TAG)
}
static int tgq_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt){
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
for (x = 0; x < FFALIGN(avctx->width, 16) >> 4; x++)
tgq_decode_mb(s, y, x);
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->frame;
return avpkt->size;
}
static int tgv_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
}
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->frame;
return buf_size;
}
static int tqi_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
tqi_idct_put(t, t->block);
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = t->frame;
return buf_size;
}
0x400, 0x800, 0x4000, 0x8000};
static int escape124_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
if (!(frame_flags & 0x114) || !(frame_flags & 0x7800000)) {
av_log(NULL, AV_LOG_DEBUG, "Skipping frame\n");
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->frame;
return frame_size;
avctx->release_buffer(avctx, &s->frame);
*(AVFrame*)data = s->frame = new_frame;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
return frame_size;
}
}
static int ffv1_decode_frame(AVCodecContext *avctx, void *data,
- int *data_size, AVPacket *avpkt)
+ int *got_frame, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
f->picture_number++;
*picture = *p;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
FFSWAP(AVFrame, f->picture, f->last_picture);
}
static int flashsv_decode_frame(AVCodecContext *avctx, void *data,
- int *data_size, AVPacket *avpkt)
+ int *got_frame, AVPacket *avpkt)
{
int buf_size = avpkt->size;
FlashSVContext *s = avctx->priv_data;
memcpy(s->keyframe, s->frame.data[0], s->frame.linesize[0] * avctx->height);
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->frame;
if ((get_bits_count(&gb) / 8) != buf_size)
}
static int flic_decode_frame_8BPP(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
const uint8_t *buf, int buf_size)
{
FlicDecodeContext *s = avctx->priv_data;
s->new_palette = 0;
}
- *data_size=sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->frame;
return buf_size;
}
static int flic_decode_frame_15_16BPP(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
const uint8_t *buf, int buf_size)
{
/* Note, the only difference between the 15Bpp and 16Bpp */
"and final chunk ptr = %d\n", buf_size, bytestream2_tell(&g2));
- *data_size=sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->frame;
return buf_size;
}
static int flic_decode_frame_24BPP(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
const uint8_t *buf, int buf_size)
{
av_log(avctx, AV_LOG_ERROR, "24Bpp FLC Unsupported due to lack of test files.\n");
}
static int flic_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
if (avctx->pix_fmt == AV_PIX_FMT_PAL8) {
- return flic_decode_frame_8BPP(avctx, data, data_size,
+ return flic_decode_frame_8BPP(avctx, data, got_frame,
buf, buf_size);
}
else if ((avctx->pix_fmt == AV_PIX_FMT_RGB555) ||
(avctx->pix_fmt == AV_PIX_FMT_RGB565)) {
- return flic_decode_frame_15_16BPP(avctx, data, data_size,
+ return flic_decode_frame_15_16BPP(avctx, data, got_frame,
buf, buf_size);
}
else if (avctx->pix_fmt == AV_PIX_FMT_BGR24) {
- return flic_decode_frame_24BPP(avctx, data, data_size,
+ return flic_decode_frame_24BPP(avctx, data, got_frame,
buf, buf_size);
}
}
static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
}
*frame = *f;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
return buf_size;
}
return 0;
}
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
int field, ret;
buf += field_size - min_field_size;
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = *pic;
return avpkt->size;
return 0;
}
-static int gif_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
+static int gif_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
+ AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
return ret;
*picture = s->picture;
- *data_size = sizeof(AVPicture);
+ *got_frame = 1;
return s->bytestream - buf;
}
}
static int h261_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
*pict = s->current_picture_ptr->f;
ff_print_debug_info(s, pict);
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
return get_consumed_bytes(s, buf_size);
}
av_const int ff_h263_aspect_to_info(AVRational aspect);
int ff_h263_decode_init(AVCodecContext *avctx);
int ff_h263_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt);
int ff_h263_decode_end(AVCodecContext *avctx);
void ff_h263_encode_mb(MpegEncContext *s,
}
int ff_h263_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
*pict = s->next_picture_ptr->f;
s->next_picture_ptr= NULL;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
}
return 0;
}
if(s->last_picture_ptr || s->low_delay){
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
ff_print_debug_info(s, pict);
}
}
static int decode_frame(AVCodecContext *avctx, void *data,
- int *data_size, AVPacket *avpkt)
+ int *got_frame, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
h->delayed_pic[i] = h->delayed_pic[i + 1];
if (out) {
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*pict = out->f;
}
if (!h->next_output_pic) {
/* Wait for second field. */
- *data_size = 0;
+ *got_frame = 0;
} else {
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*pict = h->next_output_pic->f;
}
}
- assert(pict->data[0] || !*data_size);
+ assert(pict->data[0] || !*got_frame);
ff_print_debug_info(s, pict);
return get_consumed_bytes(s, buf_index, buf_size);
s->last_slice_end = y + h;
}
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
emms_c();
*picture = *p;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
return (get_bits_count(&s->gb) + 31) / 32 * 4 + table_size;
}
}
static int idcin_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
/* make the palette available on the way out */
memcpy(s->frame.data[1], s->pal, AVPALETTE_SIZE);
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->frame;
/* report that the buffer was completely consumed */
}
static int decode_frame_ilbm(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
IffContext *s = avctx->priv_data;
}
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->frame;
return buf_size;
}
static int decode_frame_byterun1(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
IffContext *s = avctx->priv_data;
}
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->frame;
return buf_size;
}
}
static int ir2_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
}
*picture = s->picture;
- *data_size = sizeof(AVPicture);
+ *got_frame = 1;
return buf_size;
}
}
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
Indeo3DecodeContext *ctx = avctx->priv_data;
/* skip sync(null) frames */
if (res) {
// we have processed 16 bytes but no data was decoded
- *data_size = 0;
+ *got_frame = 0;
return buf_size;
}
ctx->frame.data[2], ctx->frame.linesize[2],
(avctx->height + 3) >> 2);
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = ctx->frame;
return buf_size;
}
static int ipvideo_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
ipvideo_decode_opcodes(s);
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->current_frame;
/* shuffle frames */
return result;
}
-int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
IVI45DecContext *ctx = avctx->priv_data;
ff_ivi_output_plane(&ctx->planes[2], ctx->frame.data[1], ctx->frame.linesize[1]);
ff_ivi_output_plane(&ctx->planes[1], ctx->frame.data[2], ctx->frame.linesize[2]);
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = ctx->frame;
return buf_size;
*/
void ff_ivi_output_plane(IVIPlaneDesc *plane, uint8_t *dst, int dst_pitch);
-int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt);
av_cold int ff_ivi_decode_close(AVCodecContext *avctx);
}
static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
JvContext *s = avctx->priv_data;
s->palette_has_changed = 0;
memcpy(s->frame.data[1], s->palette, AVPALETTE_SIZE);
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->frame;
}
avctx->release_buffer(avctx, &c->prev);
}
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
+ AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
const uint8_t *buf_end = buf + avpkt->size;
if (outcnt - maxcnt)
av_log(avctx, AV_LOG_DEBUG, "frame finished with %d diff\n", outcnt - maxcnt);
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = c->cur;
if (c->prev.data[0])
return 0;
}
-static int decode_frame(AVCodecContext * avctx, void *data, int *data_size, AVPacket *avpkt)
+static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame,
+ AVPacket *avpkt)
{
KmvcContext *const ctx = avctx->priv_data;
uint8_t *out, *src;
ctx->prev = ctx->frm1;
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame *) data = ctx->pic;
/* always report that the buffer was completely consumed */
* @return number of consumed bytes on success or negative if decode fails
*/
static int lag_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size, AVPacket *avpkt)
+ void *data, int *got_frame, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
}
*picture = *p;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
return buf_size;
}
* Decode a frame
*
*/
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
return -1;
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = c->pic;
/* always report that the buffer was completely consumed */
}
static int libopenjpeg_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
uint8_t *buf = avpkt->data;
int ispacked = 0;
int i;
- *data_size = 0;
+ *got_frame = 0;
// Check if input is a raw jpeg2k codestream or in jp2 wrapping
if ((AV_RB32(buf) == 12) &&
}
*output = ctx->image;
- *data_size = sizeof(AVPicture);
+ *got_frame = 1;
ret = buf_size;
done:
}
static int libschroedinger_decode_frame(AVCodecContext *avccontext,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
SchroParseUnitContext parse_ctx;
LibSchroFrameContext *framewithpts = NULL;
- *data_size = 0;
+ *got_frame = 0;
parse_context_init(&parse_ctx, buf, buf_size);
if (!buf_size) {
p_schro_params->dec_frame.linesize[2] = framewithpts->frame->components[2].stride;
*(AVFrame*)data = p_schro_params->dec_frame;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
/* Now free the frame resources. */
libschroedinger_decode_frame_free(framewithpts->frame);
av_free(framewithpts);
} else {
data = NULL;
- *data_size = 0;
+ *got_frame = 0;
}
return buf_size;
}
}
static int vp8_decode(AVCodecContext *avctx,
- void *data, int *data_size, AVPacket *avpkt)
+ void *data, int *got_frame, AVPacket *avpkt)
{
VP8Context *ctx = avctx->priv_data;
AVFrame *picture = data;
picture->linesize[1] = img->stride[1];
picture->linesize[2] = img->stride[2];
picture->linesize[3] = 0;
- *data_size = sizeof(AVPicture);
+ *got_frame = 1;
}
return avpkt->size;
}
}
static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
break;
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = l->pic;
return buf_size;
}
static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
memset(p->qscale_table, a->qscale, a->mb_width);
*picture = a->picture;
- *data_size = sizeof(AVPicture);
+ *got_frame = 1;
return (get_bits_count(&a->gb)+31)/32*4;
}
}
static int mimic_decode_frame(AVCodecContext *avctx, void *data,
- int *data_size, AVPacket *avpkt)
+ int *got_frame, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
}
*(AVFrame*)data = ctx->buf_ptrs[ctx->cur_index];
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
ctx->prev_index = ctx->next_prev_index;
ctx->cur_index = ctx->next_cur_index;
}
static int mjpegb_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
//XXX FIXME factorize, this looks very similar to the EOI code
*picture= *s->picture_ptr;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
if(!s->lossless){
picture->quality= FFMAX3(s->qscale[0], s->qscale[1], s->qscale[2]);
return start_code;
}
-int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
goto not_the_end;
}
*picture = *s->picture_ptr;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
if (!s->lossless) {
picture->quality = FFMAX3(s->qscale[0],
int ff_mjpeg_decode_init(AVCodecContext *avctx);
int ff_mjpeg_decode_end(AVCodecContext *avctx);
int ff_mjpeg_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt);
int ff_mjpeg_decode_dqt(MJpegDecodeContext *s);
int ff_mjpeg_decode_dht(MJpegDecodeContext *s);
}
static int mm_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
memcpy(s->frame.data[1], s->palette, AVPALETTE_SIZE);
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->frame;
return buf_size;
}
static int mp_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
ff_free_vlc(&mp->vlc);
end:
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame *)data = mp->frame;
return buf_size;
}
}
static int msrle_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
ff_msrle_decode(avctx, (AVPicture*)&s->frame, avctx->bits_per_coded_sample, &s->gb);
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->frame;
/* report that the buffer was completely consumed */
return !!ncol;
}
-static int mss1_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int mss1_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
memcpy(ctx->pic.data[1], c->pal, AVPALETTE_SIZE);
ctx->pic.palette_has_changed = pal_changed;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = ctx->pic;
/* always report that the buffer was completely consumed */
#define MAX_WMV9_RECTANGLES 20
#define ARITH2_PADDING 2
-static int mss2_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int mss2_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
if (buf_size)
av_log(avctx, AV_LOG_WARNING, "buffer not fully consumed\n");
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame *)data = ctx->pic;
return avpkt->size;
}
}
-static int mss3_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int mss3_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
c->pic.key_frame = keyframe;
c->pic.pict_type = keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P;
if (!bytestream2_get_bytes_left(&gb)) {
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = c->pic;
return buf_size;
dst[2] += c->pic.linesize[2] * 8;
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = c->pic;
return buf_size;
}
}
-static int mss4_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int mss4_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
c->pic.pict_type = (frame_type == INTRA_FRAME) ? AV_PICTURE_TYPE_I
: AV_PICTURE_TYPE_P;
if (frame_type == SKIP_FRAME) {
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = c->pic;
return buf_size;
dst[2] += c->pic.linesize[2] * 16;
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = c->pic;
return buf_size;
}
static int msvideo1_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
else
msvideo1_decode_16bit(s);
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->frame;
/* report that the buffer was completely consumed */
}
static int mxpeg_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
the_end:
if (jpg->got_picture) {
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*picture = *jpg->picture_ptr;
s->picture_index ^= 1;
jpg->picture_ptr = &s->picture[s->picture_index];
if (!s->got_mxm_bitmask)
s->has_complete_frame = 1;
else
- *data_size = 0;
+ *got_frame = 0;
}
}
return 1;
}
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
}
*picture = c->pic;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
return orig_size;
}
memset(dst, 0, (256 - pallen) * sizeof(*dst));
}
-static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt) {
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
}
*picture = s->picture;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
ret = buf - bufstart;
end:
};
static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
PicContext *s = avctx->priv_data;
return avpkt->size;
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->frame;
return avpkt->size;
}
}
static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
}
*picture= *s->current_picture;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
ret = bytestream2_tell(&s->gb);
the_end:
static int pnm_decode_frame(AVCodecContext *avctx, void *data,
- int *data_size, AVPacket *avpkt)
+ int *got_frame, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
break;
}
*picture = s->picture;
- *data_size = sizeof(AVPicture);
+ *got_frame = 1;
return s->bytestream - s->bytestream_start;
}
#define MOVE_DATA_PTR(nbytes) buf += (nbytes); buf_size -= (nbytes)
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
ProresContext *ctx = avctx->priv_data;
MOVE_DATA_PTR(pic_data_size);
}
- *data_size = sizeof(AVPicture);
+ *got_frame = 1;
*(AVFrame*) data = *avctx->coded_frame;
return avpkt->size;
return 0;
}
-static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt) {
const uint8_t *buf = avpkt->data;
const uint8_t *buf_end = avpkt->data + avpkt->size;
}
*picture = s->picture;
- *data_size = sizeof(AVPicture);
+ *got_frame = 1;
if (y < h) {
av_log(avctx, AV_LOG_WARNING, "incomplete packet\n");
} QdrawContext;
static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
outdata += a->pic.linesize[0];
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = a->pic;
return buf_size;
}
static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
uint8_t ctable[128];
}
memcpy(a->pic.data[1], a->pal, AVPALETTE_SIZE);
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = a->pic;
return avpkt->size;
}
static int qtrle_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
QtrleContext *s = avctx->priv_data;
}
done:
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->frame;
/* always report that the buffer was completely consumed */
return 0;
}
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
int h, w;
dst_line += pic->linesize[0];
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = *avctx->coded_frame;
return avpkt->size;
}
static int raw_decode(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
}
}
- *data_size = sizeof(AVPicture);
+ *got_frame = 1;
return buf_size;
}
static int rl2_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
/** make the palette available on the way out */
memcpy(s->frame.data[1], s->palette, AVPALETTE_SIZE);
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->frame;
/** report that the buffer was completely consumed */
}
static int roq_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
bytestream2_init(&s->gb, buf, buf_size);
roqvideo_decode_frame(s);
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = *s->current_frame;
/* shuffle frames */
}
static int rpza_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
rpza_decode_stream(s);
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->frame;
/* always report that the buffer was completely consumed */
}
static int rv10_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
}
if(s->last_picture_ptr || s->low_delay){
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
ff_print_debug_info(s, pict);
}
s->current_picture_ptr= NULL; //so we can detect if frame_end wasnt called (find some nicer solution...)
*/
int ff_rv34_get_start_offset(GetBitContext *gb, int blocks);
int ff_rv34_decode_init(AVCodecContext *avctx);
-int ff_rv34_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt);
+int ff_rv34_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt);
int ff_rv34_decode_end(AVCodecContext *avctx);
int ff_rv34_decode_init_thread_copy(AVCodecContext *avctx);
int ff_rv34_decode_update_thread_context(AVCodecContext *dst, const AVCodecContext *src);
}
static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
SgiState *s = avctx->priv_data;
if (ret == 0) {
*picture = s->picture;
- *data_size = sizeof(AVPicture);
+ *got_frame = 1;
return avpkt->size;
} else {
return ret;
return v;
}
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
+ AVPacket *avpkt)
{
SmackVContext * const smk = avctx->priv_data;
uint8_t *out;
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = smk->pic;
/* always report that the buffer was completely consumed */
}
static int smc_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
smc_decode_stream(s);
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->frame;
/* always report that the buffer was completely consumed */
return 0;
}
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt){
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
+ AVPacket *avpkt)
+{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
SnowContext *s = avctx->priv_data;
else
*picture= s->mconly_picture;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
bytes_read= c->bytestream - c->bytestream_start;
if(bytes_read ==0) av_log(s->avctx, AV_LOG_ERROR, "error at end of frame\n"); //FIXME
static int sp5x_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
av_init_packet(&avpkt_recoded);
avpkt_recoded.data = recoded;
avpkt_recoded.size = j;
- i = ff_mjpeg_decode_frame(avctx, data, data_size, &avpkt_recoded);
+ i = ff_mjpeg_decode_frame(avctx, data, got_frame, &avpkt_recoded);
av_free(recoded);
}
static int sunrast_decode_frame(AVCodecContext *avctx, void *data,
- int *data_size, AVPacket *avpkt) {
+ int *got_frame, AVPacket *avpkt)
+{
const uint8_t *buf = avpkt->data;
const uint8_t *buf_end = avpkt->data + avpkt->size;
SUNRASTContext * const s = avctx->priv_data;
}
*picture = s->picture;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
return buf - bufstart;
}
}
static int svq1_decode_frame(AVCodecContext *avctx, void *data,
- int *data_size, AVPacket *avpkt)
+ int *got_frame, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
ff_MPV_frame_end(s);
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
result = buf_size;
err:
}
static int svq3_decode_frame(AVCodecContext *avctx, void *data,
- int *data_size, AVPacket *avpkt)
+ int *got_frame, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
SVQ3Context *svq3 = avctx->priv_data;
if (s->next_picture_ptr && !s->low_delay) {
*(AVFrame *) data = s->next_picture.f;
s->next_picture_ptr = NULL;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
}
return 0;
}
/* Do not output the last pic after seeking. */
if (s->last_picture_ptr || s->low_delay)
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
return buf_size;
}
}
static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
TargaContext * const s = avctx->priv_data;
}
*picture = s->picture;
- *data_size = sizeof(AVPicture);
+ *got_frame = 1;
return avpkt->size;
}
}
static int seqvideo_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
if (seqvideo_decode(seq, buf, buf_size))
return AVERROR_INVALIDDATA;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame *)data = seq->frame;
return buf_size;
}
static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size, AVPacket *avpkt)
+ void *data, int *got_frame, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
}
}
*picture = s->picture;
- *data_size = sizeof(AVPicture);
+ *got_frame = 1;
return buf_size;
}
} TMVContext;
static int tmv_decode_frame(AVCodecContext *avctx, void *data,
- int *data_size, AVPacket *avpkt)
+ int *got_frame, AVPacket *avpkt)
{
TMVContext *tmv = avctx->priv_data;
const uint8_t *src = avpkt->data;
if (avpkt->size < 2*char_rows*char_cols) {
av_log(avctx, AV_LOG_ERROR,
"Input buffer too small, truncated sample?\n");
- *data_size = 0;
+ *got_frame = 0;
return -1;
}
dst += tmv->pic.linesize[0] * 8;
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame *)data = tmv->pic;
return avpkt->size;
}
static int truemotion1_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
truemotion1_decode_16bit(s);
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->frame;
/* report that the buffer was completely consumed */
};
static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
p->pict_type = AV_PICTURE_TYPE_P;
l->cur = !l->cur;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = l->pic;
av_free(swbuf);
* Decode a frame
*
*/
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
+ AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
memcpy(c->pic.data[1], c->pal, AVPALETTE_SIZE);
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = c->pic;
/* always report that the buffer was completely consumed */
}
static int tscc2_decode_frame(AVCodecContext *avctx, void *data,
- int *data_size, AVPacket *avpkt)
+ int *got_frame, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
}
if (frame_type == 0) {
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = c->pic;
return buf_size;
bytestream2_skip(&gb, size);
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = c->pic;
/* always report that the buffer was completely consumed */
return 0;
}
-static int txd_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int txd_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt) {
TXDContext * const s = avctx->priv_data;
GetByteContext gb;
}
*picture = s->picture;
- *data_size = sizeof(AVPicture);
+ *got_frame = 1;
return avpkt->size;
}
static int ulti_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
}
}
- *data_size=sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data= s->frame;
return buf_size;
}
}
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
c->pic.pict_type = AV_PICTURE_TYPE_I;
c->pic.interlaced_frame = !!c->interlaced;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = c->pic;
/* always report that the buffer was completely consumed */
return 0;
}
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
int h, w;
v += pic->linesize[2] / 2 - avctx->width / 2;
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = *avctx->coded_frame;
return avpkt->size;
return 0;
}
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
+ AVPacket *avpkt)
{
int y=0;
int width= avctx->width;
}
}
- *data_size=sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data= *avctx->coded_frame;
return avpkt->size;
}
static int v410_decode_frame(AVCodecContext *avctx, void *data,
- int *data_size, AVPacket *avpkt)
+ int *got_frame, AVPacket *avpkt)
{
AVFrame *pic = avctx->coded_frame;
uint8_t *src = avpkt->data;
v += pic->linesize[2] >> 1;
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame *)data = *pic;
return avpkt->size;
return 0;
}
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
+ AVPacket *avpkt)
{
VBDecContext * const c = avctx->priv_data;
uint8_t *outptr, *srcptr;
FFSWAP(uint8_t*, c->frame, c->prev_frame);
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = c->pic;
/* always report that the buffer was completely consumed */
}
}
-static int vble_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int vble_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
VBLEContext *ctx = avctx->priv_data;
vble_restore_plane(ctx, 2, offset, width_uv, height_uv);
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame *)data = *pic;
return avpkt->size;
* @todo TODO: Handle VC-1 IDUs (Transport level?)
*/
static int vc1_decode_frame(AVCodecContext *avctx, void *data,
- int *data_size, AVPacket *avpkt)
+ int *got_frame, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size, n_slices = 0, i;
*pict = s->next_picture_ptr->f;
s->next_picture_ptr = NULL;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
}
return 0;
goto err;
#endif
*pict = v->sprite_output_frame;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
} else {
if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {
*pict = s->current_picture_ptr->f;
*pict = s->last_picture_ptr->f;
}
if (s->last_picture_ptr || s->low_delay) {
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
ff_print_debug_info(s, pict);
}
}
}
static int vcr1_decode_frame(AVCodecContext *avctx, void *data,
- int *data_size, AVPacket *avpkt)
+ int *got_frame, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
}
*picture = a->picture;
- *data_size = sizeof(AVPicture);
+ *got_frame = 1;
return buf_size;
}
}
static int vmdvideo_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
if (s->frame.data[0])
avctx->release_buffer(avctx, &s->frame);
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->prev_frame;
/* report that the buffer was completely consumed */
return src - ssrc;
}
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
+ AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
put_cursor(outptr, c->pic.linesize[0], c, c->cur_x, c->cur_y);
}
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = c->pic;
/* always report that the buffer was completely consumed */
}
static int vp3_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
}
vp3_draw_horiz_band(s, s->avctx->height);
- *data_size=sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data= s->current_frame;
if (!HAVE_THREADS || !(s->avctx->active_thread_type&FF_THREAD_FRAME))
return 0;
}
-int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
p->qscale_table = s->qscale_table;
p->qscale_type = FF_QSCALE_TYPE_VP56;
*(AVFrame*)data = *p;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
return avpkt->size;
}
void ff_vp56_init(AVCodecContext *avctx, int flip, int has_alpha);
int ff_vp56_free(AVCodecContext *avctx);
void ff_vp56_init_dequant(VP56Context *s, int quantizer);
-int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt);
return 0;
}
-static int vp8_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int vp8_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
VP8Context *s = avctx->priv_data;
if (!s->invisible) {
*(AVFrame*)data = *curframe;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
}
return avpkt->size;
}
static int vqa_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
VqaContext *s = avctx->priv_data;
memcpy(s->frame.data[1], s->palette, PALETTE_COUNT * 4);
s->frame.palette_has_changed = 1;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->frame;
/* report that the buffer was completely consumed */
}
static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = l->pic;
av_free(rbuf);
#endif
static int xan_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
if (s->last_frame.data[0])
avctx->release_buffer(avctx, &s->last_frame);
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->current_frame;
/* shuffle frames */
120, 121, 122, 123, 124, 125, 126, 127};
static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
V += a->pic.linesize[2];
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = a->pic;
return buf_size;
}
static int xwd_decode_frame(AVCodecContext *avctx, void *data,
- int *data_size, AVPacket *avpkt)
+ int *got_frame, AVPacket *avpkt)
{
AVFrame *p = avctx->coded_frame;
const uint8_t *buf = avpkt->data;
ptr += p->linesize[0];
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame *)data = *p;
return buf_size;
}
static int xan_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
XanContext *s = avctx->priv_data;
if (ret)
return ret;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->pic;
return avpkt->size;
s->dstptr += 2;
}
-static int yop_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int yop_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
YopDecContext *s = avctx->priv_data;
yop_next_macroblock(s);
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame *) data = s->frame;
return avpkt->size;
}
} ZeroCodecContext;
static int zerocodec_decode_frame(AVCodecContext *avctx, void *data,
- int *data_size, AVPacket *avpkt)
+ int *got_frame, AVPacket *avpkt)
{
ZeroCodecContext *zc = avctx->priv_data;
AVFrame *pic = avctx->coded_frame;
if (prev_pic->data[0])
avctx->release_buffer(avctx, prev_pic);
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame *)data = *pic;
/* Store the previous frame for use later.
return 0;
}
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
}
FFSWAP(uint8_t *, c->cur, c->prev);
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = c->pic;
/* always report that the buffer was completely consumed */