mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-04-11 03:32:39 +00:00
avformat/matroskaenc: Hoist check out of loop
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
d9d5695390
commit
43db0e5ecf
@ -1877,9 +1877,13 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
|
|||||||
|
|
||||||
// look for a codec ID string specific to mkv to use,
|
// look for a codec ID string specific to mkv to use,
|
||||||
// if none are found, use AVI codes
|
// if none are found, use AVI codes
|
||||||
if (par->codec_id != AV_CODEC_ID_RAWVIDEO || par->codec_tag) {
|
if (par->codec_id == AV_CODEC_ID_FFV1) {
|
||||||
|
/* FFV1 is actually supported natively in Matroska,
|
||||||
|
* yet we use the VfW way to mux it for compatibility
|
||||||
|
* with old demuxers. (FIXME: Are they really important?) */
|
||||||
|
} else if (par->codec_id != AV_CODEC_ID_RAWVIDEO || par->codec_tag) {
|
||||||
for (j = 0; ff_mkv_codec_tags[j].id != AV_CODEC_ID_NONE; j++) {
|
for (j = 0; ff_mkv_codec_tags[j].id != AV_CODEC_ID_NONE; j++) {
|
||||||
if (ff_mkv_codec_tags[j].id == par->codec_id && par->codec_id != AV_CODEC_ID_FFV1) {
|
if (ff_mkv_codec_tags[j].id == par->codec_id) {
|
||||||
put_ebml_string(pb, MATROSKA_ID_CODECID, ff_mkv_codec_tags[j].str);
|
put_ebml_string(pb, MATROSKA_ID_CODECID, ff_mkv_codec_tags[j].str);
|
||||||
native_id = 1;
|
native_id = 1;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user