2
0
mirror of https://github.com/Genymobile/scrcpy synced 2025-09-01 14:55:13 +00:00

Accept .m4a and .mka

These are just aliases for mp4 and mkv when there is no video stream.

PR #3978 <https://github.com/Genymobile/scrcpy/pull/3978>
This commit is contained in:
Romain Vimont
2023-05-07 12:23:51 +02:00
parent 98f4f4e68a
commit d6bcde565f
3 changed files with 28 additions and 3 deletions

View File

@@ -1487,6 +1487,12 @@ get_record_format(const char *name) {
if (!strcmp(name, "mkv")) {
return SC_RECORD_FORMAT_MKV;
}
if (!strcmp(name, "m4a")) {
return SC_RECORD_FORMAT_M4A;
}
if (!strcmp(name, "mka")) {
return SC_RECORD_FORMAT_MKA;
}
return 0;
}
@@ -1974,6 +1980,12 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[],
LOGW("Recording does not support RAW audio codec");
return false;
}
if (opts->video
&& sc_record_format_is_audio_only(opts->record_format)) {
LOGE("Audio container does not support video stream");
return false;
}
}
if (opts->audio_codec == SC_CODEC_RAW) {