Commit 35596bd4 authored by Anton Khirnov's avatar Anton Khirnov

wavpack: remove a useless parameter from wavpack_decode_block().

The decoder always returns output if an error does not occur.
parent d1bec4be
...@@ -752,8 +752,7 @@ static av_cold int wavpack_decode_end(AVCodecContext *avctx) ...@@ -752,8 +752,7 @@ static av_cold int wavpack_decode_end(AVCodecContext *avctx)
} }
static int wavpack_decode_block(AVCodecContext *avctx, int block_no, static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
uint8_t **data, int *got_frame_ptr, uint8_t **data, const uint8_t *buf, int buf_size)
const uint8_t *buf, int buf_size)
{ {
WavpackContext *wc = avctx->priv_data; WavpackContext *wc = avctx->priv_data;
WavpackFrameContext *s; WavpackFrameContext *s;
...@@ -1128,8 +1127,6 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no, ...@@ -1128,8 +1127,6 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
memcpy(samples_r, samples_l, bpp * s->samples); memcpy(samples_r, samples_l, bpp * s->samples);
} }
*got_frame_ptr = 1;
return 0; return 0;
} }
...@@ -1215,7 +1212,7 @@ static int wavpack_decode_frame(AVCodecContext *avctx, void *data, ...@@ -1215,7 +1212,7 @@ static int wavpack_decode_frame(AVCodecContext *avctx, void *data,
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
if ((ret = wavpack_decode_block(avctx, s->block, if ((ret = wavpack_decode_block(avctx, s->block,
frame->extended_data, got_frame_ptr, frame->extended_data,
buf, frame_size)) < 0) { buf, frame_size)) < 0) {
wavpack_decode_flush(avctx); wavpack_decode_flush(avctx);
return ret; return ret;
...@@ -1225,6 +1222,8 @@ static int wavpack_decode_frame(AVCodecContext *avctx, void *data, ...@@ -1225,6 +1222,8 @@ static int wavpack_decode_frame(AVCodecContext *avctx, void *data,
buf_size -= frame_size; buf_size -= frame_size;
} }
*got_frame_ptr = 1;
return avpkt->size; return avpkt->size;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment