mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avcodec/utils: Avoid hardcoding duplicated types in sizeof()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
2cd718a4c5
commit
860d991fcd
@ -608,7 +608,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
|
|||||||
|
|
||||||
ff_lock_avcodec(avctx, codec);
|
ff_lock_avcodec(avctx, codec);
|
||||||
|
|
||||||
avctx->internal = av_mallocz(sizeof(AVCodecInternal));
|
avctx->internal = av_mallocz(sizeof(*avctx->internal));
|
||||||
if (!avctx->internal) {
|
if (!avctx->internal) {
|
||||||
ret = AVERROR(ENOMEM);
|
ret = AVERROR(ENOMEM);
|
||||||
goto end;
|
goto end;
|
||||||
@ -1099,7 +1099,7 @@ void avsubtitle_free(AVSubtitle *sub)
|
|||||||
|
|
||||||
av_freep(&sub->rects);
|
av_freep(&sub->rects);
|
||||||
|
|
||||||
memset(sub, 0, sizeof(AVSubtitle));
|
memset(sub, 0, sizeof(*sub));
|
||||||
}
|
}
|
||||||
|
|
||||||
av_cold int avcodec_close(AVCodecContext *avctx)
|
av_cold int avcodec_close(AVCodecContext *avctx)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user