mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
ffmpeg/opt_preset: update to new option API for reading codec names.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
bad953bc2d
commit
3db4c88ac1
@ -1960,9 +1960,11 @@ static int opt_preset(void *optctx, const char *opt, const char *arg)
|
|||||||
OptionsContext *o = optctx;
|
OptionsContext *o = optctx;
|
||||||
FILE *f=NULL;
|
FILE *f=NULL;
|
||||||
char filename[1000], line[1000], tmp_line[1000];
|
char filename[1000], line[1000], tmp_line[1000];
|
||||||
const char *codec_name = *opt == 'v' ? video_codec_name :
|
const char *codec_name = NULL;
|
||||||
*opt == 'a' ? audio_codec_name :
|
|
||||||
subtitle_codec_name;
|
tmp_line[0] = *opt;
|
||||||
|
tmp_line[1] = 0;
|
||||||
|
MATCH_PER_TYPE_OPT(codec_names, str, codec_name, NULL, tmp_line);
|
||||||
|
|
||||||
if (!(f = get_preset_file(filename, sizeof(filename), arg, *opt == 'f', codec_name))) {
|
if (!(f = get_preset_file(filename, sizeof(filename), arg, *opt == 'f', codec_name))) {
|
||||||
if(!strncmp(arg, "libx264-lossless", strlen("libx264-lossless"))){
|
if(!strncmp(arg, "libx264-lossless", strlen("libx264-lossless"))){
|
||||||
|
Loading…
Reference in New Issue
Block a user