This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 28ab24b717 avformat/matroskadec: avoid calling get_bytes_left() three
times with the same state
28ab24b717 is described below
commit 28ab24b71717027ab67e6220bd0dad82a90f22c1
Author: Zhao Zhili <[email protected]>
AuthorDate: Wed Apr 1 21:09:47 2026 +0800
Commit: James Almer <[email protected]>
CommitDate: Wed Apr 1 14:19:35 2026 +0000
avformat/matroskadec: avoid calling get_bytes_left() three times with the
same state
Signed-off-by: Zhao Zhili <[email protected]>
---
libavformat/matroskadec.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 64bea7969e..1900a93210 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -3978,15 +3978,15 @@ static int
matroska_parse_block_additional(MatroskaDemuxContext *matroska,
switch (provider_code) {
case ITU_T_T35_PROVIDER_CODE_VNOVA: {
uint8_t *data;
+ int left = bytestream2_get_bytes_left(&bc);
- if (bytestream2_get_bytes_left(&bc) < 2)
+ if (left < 2)
return AVERROR_INVALIDDATA;
-
- data = av_packet_new_side_data(pkt, AV_PKT_DATA_LCEVC,
bytestream2_get_bytes_left(&bc));
+ data = av_packet_new_side_data(pkt, AV_PKT_DATA_LCEVC, left);
if (!data)
return AVERROR(ENOMEM);
- bytestream2_get_bufferu(&bc, data,
bytestream2_get_bytes_left(&bc));
+ bytestream2_get_bufferu(&bc, data, left);
return 0;
}
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]