mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
avcodec/codec_internal: Make FFCodec.decode use AVFrame*
This increases type-safety by avoiding conversions from/through void*. It also avoids the boilerplate "AVFrame *frame = data;" line for non-subtitle decoders. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -262,15 +262,13 @@ static int tgv_decode_inter(TgvContext *s, AVFrame *frame,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tgv_decode_frame(AVCodecContext *avctx,
|
||||
void *data, int *got_frame,
|
||||
AVPacket *avpkt)
|
||||
static int tgv_decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
int *got_frame, AVPacket *avpkt)
|
||||
{
|
||||
const uint8_t *buf = avpkt->data;
|
||||
int buf_size = avpkt->size;
|
||||
TgvContext *s = avctx->priv_data;
|
||||
const uint8_t *buf_end = buf + buf_size;
|
||||
AVFrame *frame = data;
|
||||
int chunk_type, ret;
|
||||
|
||||
if (buf_end - buf < EA_PREAMBLE_SIZE)
|
||||
|
||||
Reference in New Issue
Block a user