}
static int decode_chunks(AVCodecContext *avctx,
- AVFrame *picture, int *data_size,
+ AVFrame *picture, int *got_output,
const uint8_t *buf, int buf_size)
{
Mpeg1Context *s = avctx->priv_data;
if (slice_end(avctx, picture)) {
if (s2->last_picture_ptr || s2->low_delay) //FIXME merge with the stuff in mpeg_decode_slice
- *data_size = sizeof(AVPicture);
+ *got_output = 1;
}
}
s2->pict_type = 0;
}
static int mpeg_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_output,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
*picture = s2->next_picture_ptr->f;
s2->next_picture_ptr = NULL;
- *data_size = sizeof(AVFrame);
+ *got_output = 1;
}
return buf_size;
}
s->slice_count = 0;
if (avctx->extradata && !avctx->frame_number) {
- int ret = decode_chunks(avctx, picture, data_size, avctx->extradata, avctx->extradata_size);
+ int ret = decode_chunks(avctx, picture, got_output, avctx->extradata, avctx->extradata_size);
if (ret < 0 && (avctx->err_recognition & AV_EF_EXPLODE))
return ret;
}
- return decode_chunks(avctx, picture, data_size, buf, buf_size);
+ return decode_chunks(avctx, picture, got_output, buf, buf_size);
}