Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-10-23 15:42:24 +0300
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-10-27 16:32:37 +0300
commit5da8b522c85c2fb877917c1df6388312803fb36e (patch)
tree6388024391acd2dda2a8fb5f233e20df99eadc79 /libavformat
parent495d738b1b07fd25198760bd932a83fbb17a96b9 (diff)
avformat/mux: Don't call ff_toupper4() unnecessarily
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mux.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/mux.c b/libavformat/mux.c
index 5d89458f82..a7517dae0a 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -148,6 +148,7 @@ static int validate_codec_tag(AVFormatContext *s, AVStream *st)
{
const AVCodecTag *avctag;
enum AVCodecID id = AV_CODEC_ID_NONE;
+ unsigned uppercase_tag = ff_toupper4(st->codecpar->codec_tag);
int64_t tag = -1;
/**
@@ -159,7 +160,7 @@ static int validate_codec_tag(AVFormatContext *s, AVStream *st)
for (int n = 0; s->oformat->codec_tag[n]; n++) {
avctag = s->oformat->codec_tag[n];
while (avctag->id != AV_CODEC_ID_NONE) {
- if (ff_toupper4(avctag->tag) == ff_toupper4(st->codecpar->codec_tag)) {
+ if (ff_toupper4(avctag->tag) == uppercase_tag) {
id = avctag->id;
if (id == st->codecpar->codec_id)
return 1;