diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-08-23 09:12:28 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-08-24 03:05:27 +0200 |
commit | ff02a4239412971b53abde2116e3bc2ce92d58ff (patch) | |
tree | 6aed31bf8a8b396aac9e9ed2ba306a78b6720408 /libavformat | |
parent | cb23c1e55359dc1319690517251ee170d0d68bae (diff) |
avformat/crcenc: Simplify writing trailer
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/crcenc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavformat/crcenc.c b/libavformat/crcenc.c index 4fdc448141..c58fbd6c88 100644 --- a/libavformat/crcenc.c +++ b/libavformat/crcenc.c @@ -48,10 +48,8 @@ static int crc_write_packet(struct AVFormatContext *s, AVPacket *pkt) static int crc_write_trailer(struct AVFormatContext *s) { CRCState *crc = s->priv_data; - char buf[64]; - snprintf(buf, sizeof(buf), "CRC=0x%08"PRIx32"\n", crc->crcval); - avio_write(s->pb, buf, strlen(buf)); + avio_printf(s->pb, "CRC=0x%08"PRIx32"\n", crc->crcval); return 0; } |