From: Andre Noll Date: Wed, 11 Aug 2021 19:30:14 +0000 (+0200) Subject: mp4: Open-code pointless truncate_stream(). X-Git-Tag: v0.7.1~7^2~93 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=86979a2f1baa4777bf17bfba23f44fe20bcf9d72;p=paraslash.git mp4: Open-code pointless truncate_stream(). This trivial one-liner has only a single caller. --- diff --git a/mp4.c b/mp4.c index 9b7d5edb..da904aa8 100644 --- a/mp4.c +++ b/mp4.c @@ -1901,11 +1901,6 @@ static int32_t write_int32(struct mp4 *f, uint32_t data) return write_data(f, temp, sizeof(temp)); } -static int32_t truncate_stream(struct mp4 *f) -{ - return f->stream->truncate(f->stream->user_data); -} - int32_t mp4_meta_update(struct mp4_callback *f, const struct mp4_metadata *data) { void *new_moov_data; @@ -1940,9 +1935,7 @@ int32_t mp4_meta_update(struct mp4_callback *f, const struct mp4_metadata *data) write_data(ff, "moov", 4); write_data(ff, new_moov_data, new_moov_size); } - - truncate_stream(ff); - + f->truncate(f->user_data); mp4_close(ff); return 1; }