You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avformat/mux: Don't call ff_toupper4() unnecessarily
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -148,6 +148,7 @@ static int validate_codec_tag(AVFormatContext *s, AVStream *st)
|
|||||||
{
|
{
|
||||||
const AVCodecTag *avctag;
|
const AVCodecTag *avctag;
|
||||||
enum AVCodecID id = AV_CODEC_ID_NONE;
|
enum AVCodecID id = AV_CODEC_ID_NONE;
|
||||||
|
unsigned uppercase_tag = ff_toupper4(st->codecpar->codec_tag);
|
||||||
int64_t tag = -1;
|
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++) {
|
for (int n = 0; s->oformat->codec_tag[n]; n++) {
|
||||||
avctag = s->oformat->codec_tag[n];
|
avctag = s->oformat->codec_tag[n];
|
||||||
while (avctag->id != AV_CODEC_ID_NONE) {
|
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;
|
id = avctag->id;
|
||||||
if (id == st->codecpar->codec_id)
|
if (id == st->codecpar->codec_id)
|
||||||
return 1;
|
return 1;
|
||||||
|
Reference in New Issue
Block a user