mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
avcodec/codec_internal: Add FFCodec.decode_sub
This increases type-safety by avoiding conversions from/through void*. It also avoids the boilerplate "AVSubtitle *sub = data;" line for subtitle decoders. Its only downside is that it increases sizeof(FFCodec), yet this can be more than offset lateron. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
1c3c29d07d
commit
fb59a42ef9
22 changed files with 76 additions and 87 deletions
|
|
@ -80,7 +80,7 @@ int av_codec_is_encoder(const AVCodec *avcodec)
|
|||
int av_codec_is_decoder(const AVCodec *avcodec)
|
||||
{
|
||||
const FFCodec *const codec = ffcodec(avcodec);
|
||||
return codec && (codec->decode || codec->receive_frame);
|
||||
return codec && (codec->decode || codec->decode_sub || codec->receive_frame);
|
||||
}
|
||||
|
||||
int ff_set_dimensions(AVCodecContext *s, int width, int height)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue