summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg12.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-09-29 13:50:44 +0200
committerAnton Khirnov <anton@khirnov.net>2012-09-29 19:18:39 +0200
commit0f583d20d5ddcab34d8af76a597d5d6f1f19fece (patch)
treedcbd3cb6e155c56250cb72e84a845e356344824f /libavcodec/mpeg12.c
parentd9a2e87b1ce44cce23801e7ec6810f8bf994fa23 (diff)
mpeg12: fix the semantics of the int* parameter of decode()
It is got_output, not data_size.
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r--libavcodec/mpeg12.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 035ee5661d..a9626c4026 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -2186,7 +2186,7 @@ int ff_mpeg1_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size,
}
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;
@@ -2215,7 +2215,7 @@ static int decode_chunks(AVCodecContext *avctx,
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;
@@ -2417,7 +2417,7 @@ static int decode_chunks(AVCodecContext *avctx,
}
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;
@@ -2433,7 +2433,7 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
*picture = s2->next_picture_ptr->f;
s2->next_picture_ptr = NULL;
- *data_size = sizeof(AVFrame);
+ *got_output = 1;
}
return buf_size;
}
@@ -2451,12 +2451,12 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
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);
}