summaryrefslogtreecommitdiff
path: root/libavcodec/diracdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/diracdec.c')
-rw-r--r--libavcodec/diracdec.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c
index 571989aa64..8e62391555 100644
--- a/libavcodec/diracdec.c
+++ b/libavcodec/diracdec.c
@@ -1706,7 +1706,7 @@ static int dirac_decode_picture_header(DiracContext *s)
return 0;
}
-static int get_delayed_pic(DiracContext *s, AVFrame *picture, int *data_size)
+static int get_delayed_pic(DiracContext *s, AVFrame *picture, int *got_frame)
{
DiracFrame *out = s->delay_frames[0];
int i, out_idx = 0;
@@ -1723,7 +1723,7 @@ static int get_delayed_pic(DiracContext *s, AVFrame *picture, int *data_size)
if (out) {
out->avframe.reference ^= DELAYED_PIC_REF;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame *)picture = out->avframe;
}
@@ -1827,7 +1827,7 @@ static int dirac_decode_data_unit(AVCodecContext *avctx, const uint8_t *buf, int
return 0;
}
-static int dirac_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *pkt)
+static int dirac_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *pkt)
{
DiracContext *s = avctx->priv_data;
DiracFrame *picture = data;
@@ -1843,11 +1843,11 @@ static int dirac_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
}
s->current_picture = NULL;
- *data_size = 0;
+ *got_frame = 0;
/* end of stream, so flush delayed pics */
if (buf_size == 0)
- return get_delayed_pic(s, (AVFrame *)data, data_size);
+ return get_delayed_pic(s, (AVFrame *)data, got_frame);
for (;;) {
/*[DIRAC_STD] Here starts the code from parse_info() defined in 9.6
@@ -1905,15 +1905,15 @@ static int dirac_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
if (delayed_frame) {
delayed_frame->avframe.reference ^= DELAYED_PIC_REF;
*(AVFrame*)data = delayed_frame->avframe;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
}
} else if (s->current_picture->avframe.display_picture_number == s->frame_number) {
/* The right frame at the right time :-) */
*(AVFrame*)data = s->current_picture->avframe;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
}
- if (*data_size)
+ if (*got_frame)
s->frame_number = picture->avframe.display_picture_number + 1;
return buf_idx;