Commit 860d991f authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/utils: Avoid hardcoding duplicated types in sizeof()

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 2cd718a4
......@@ -608,7 +608,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
ff_lock_avcodec(avctx, codec);
avctx->internal = av_mallocz(sizeof(AVCodecInternal));
avctx->internal = av_mallocz(sizeof(*avctx->internal));
if (!avctx->internal) {
ret = AVERROR(ENOMEM);
goto end;
......@@ -1099,7 +1099,7 @@ void avsubtitle_free(AVSubtitle *sub)
av_freep(&sub->rects);
memset(sub, 0, sizeof(AVSubtitle));
memset(sub, 0, sizeof(*sub));
}
av_cold int avcodec_close(AVCodecContext *avctx)
......
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