diff options
author | Paul B Mahol <onemda@gmail.com> | 2012-12-05 18:24:43 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2012-12-05 18:24:43 +0000 |
commit | 4012cd6c4f19f09cac86c9b8c9738f27bb691764 (patch) | |
tree | 605a9342eb74f30c32ce1a772880612e7066d930 /libavcodec/diracdec.c | |
parent | 835fd779a46d14d6999618546a9833b3f2af2326 (diff) | |
download | ffmpeg-streaming-4012cd6c4f19f09cac86c9b8c9738f27bb691764.zip ffmpeg-streaming-4012cd6c4f19f09cac86c9b8c9738f27bb691764.tar.gz |
lavc: fix decode_frame() third parameter semantics for rest of video decoders
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/diracdec.c')
-rw-r--r-- | libavcodec/diracdec.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c index 571989a..8e62391 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; |