[FFmpeg-cvslog] avformat/crcenc: Simplify writing trailer
Andreas Rheinhardt
git at videolan.org
Tue Aug 24 05:57:27 EEST 2021
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Mon Aug 23 09:12:28 2021 +0200| [ff02a4239412971b53abde2116e3bc2ce92d58ff] | committer: Andreas Rheinhardt
avformat/crcenc: Simplify writing trailer
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ff02a4239412971b53abde2116e3bc2ce92d58ff
---
libavformat/crcenc.c | 4 +---
1 file changed, 1 insertion(+), 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;
}
More information about the ffmpeg-cvslog
mailing list