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:
authorZhao Zhili <quinkblack@foxmail.com>2022-04-19 08:12:49 +0300
committerZhao Zhili <zhilizhao@tencent.com>2022-05-03 19:35:50 +0300
commit580fb6a8c94e7a41c8160186289fd852a9c1f5cd (patch)
tree5cf6f246f79bb69158867686cdb533e070d60c97 /libavformat/mov.c
parente561d16d49420d3cd23f04a588f64b64def669b6 (diff)
avformat/mov: skip call ff_codec_get_id if possible
ff_codec_get_id loops over ff_codec_movvideo_tags (which is a large array) two times. The result is unused most of the cases. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 0f63d997fc..24cce47884 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2489,8 +2489,6 @@ static int mov_skip_multiple_stsd(MOVContext *c, AVIOContext *pb,
int codec_tag, int format,
int64_t size)
{
- int video_codec_id = ff_codec_get_id(ff_codec_movvideo_tags, format);
-
if (codec_tag &&
(codec_tag != format &&
// AVID 1:1 samples with differing data format and codec tag exist
@@ -2499,7 +2497,7 @@ static int mov_skip_multiple_stsd(MOVContext *c, AVIOContext *pb,
codec_tag != AV_RL32("apcn") && codec_tag != AV_RL32("apch") &&
// so is dv (sigh)
codec_tag != AV_RL32("dvpp") && codec_tag != AV_RL32("dvcp") &&
- (c->fc->video_codec_id ? video_codec_id != c->fc->video_codec_id
+ (c->fc->video_codec_id ? ff_codec_get_id(ff_codec_movvideo_tags, format) != c->fc->video_codec_id
: codec_tag != MKTAG('j','p','e','g')))) {
/* Multiple fourcc, we skip JPEG. This is not correct, we should
* export it as a separate AVStream but this needs a few changes