diff mbox series

[FFmpeg-devel,5/7] avcodec/ttmlenc: Remove always-true check

Message ID GV1SPRMB006341D99D8CD7779EC430188F522@GV1SPRMB0063.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit ed9de6d2d8cb82cd646a18c0d0c745a65c96f2cc
Headers show
Series [FFmpeg-devel,1/7] avcodec/assenc: Use size_t for length of string | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Feb. 18, 2024, 1:43 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/ttmlenc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/ttmlenc.c b/libavcodec/ttmlenc.c
index f48274d2ea..779cb75199 100644
--- a/libavcodec/ttmlenc.c
+++ b/libavcodec/ttmlenc.c
@@ -351,9 +351,8 @@  static int ttml_write_header_content(AVCodecContext *avctx)
     memcpy(avctx->extradata, TTMLENC_EXTRADATA_SIGNATURE,
            TTMLENC_EXTRADATA_SIGNATURE_SIZE);
 
-    if (additional_extradata_size)
-        memcpy(avctx->extradata + TTMLENC_EXTRADATA_SIGNATURE_SIZE,
-               s->buffer.str, additional_extradata_size);
+    memcpy(avctx->extradata + TTMLENC_EXTRADATA_SIGNATURE_SIZE,
+           s->buffer.str, additional_extradata_size);
 
     ret = 0;
 fail: