diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-06-04 02:53:58 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-01-13 00:57:01 +0300 |
commit | 860d991fcd715233b5b9eb1f6c7bf0aadefb6061 (patch) | |
tree | 36a99ed4446e61d6f1c8f0b97b1dda21450a9d85 /libavcodec/utils.c | |
parent | 2cd718a4c52f3225d36d35055f16ef923c03aeac (diff) |
avcodec/utils: Avoid hardcoding duplicated types in sizeof()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 4d736d2e7d..4c718432ad 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -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) |