mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-23 04:24:35 +02:00
avcodec/utils: Avoid hardcoding duplicated types in sizeof()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 860d991fcd715233b5b9eb1f6c7bf0aadefb6061) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
d8e501de42
commit
7965ffbeb1
@ -1270,7 +1270,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
avctx->internal = av_mallocz(sizeof(AVCodecInternal));
|
||||
avctx->internal = av_mallocz(sizeof(*avctx->internal));
|
||||
if (!avctx->internal) {
|
||||
ret = AVERROR(ENOMEM);
|
||||
goto end;
|
||||
@ -2795,7 +2795,7 @@ void avsubtitle_free(AVSubtitle *sub)
|
||||
|
||||
av_freep(&sub->rects);
|
||||
|
||||
memset(sub, 0, sizeof(AVSubtitle));
|
||||
memset(sub, 0, sizeof(*sub));
|
||||
}
|
||||
|
||||
static int do_decode(AVCodecContext *avctx, AVPacket *pkt)
|
||||
|
Loading…
x
Reference in New Issue
Block a user