History

avfiltergraph: add aresample_swr_opts

Michael Niedermayer committed 13 years ago

Commit 69d45d21 parent 26240272 files · +5 −1Browse files

Unified · Split

2 files
  1. libavfilter/avfiltergraph.c +3 −1
  2. libavfilter/avfiltergraph.h +2 −0
libavfilter/avfiltergraph.c+3−1
@@ -37,6 +37,7 @@ · 36 unmodified lines
37 37
38static const AVOption options[]={38static const AVOption options[]={
39{"scale_sws_opts" , "default scale filter options" , OFFSET(scale_sws_opts) , AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, 0 },39{"scale_sws_opts" , "default scale filter options" , OFFSET(scale_sws_opts) , AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, 0 },
40{"aresample_swr_opts" , "default aresample filter options" , OFFSET(aresample_swr_opts) , AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, 0 },
40{0}41{0}
41};42};
42 43
@@ -66,6 +67,7 @@ void avfilter_graph_free(AVFilterGraph **graph) · 23 unmodified lines
66 avfilter_free((*graph)->filters[(*graph)->filter_count - 1]);67 avfilter_free((*graph)->filters[(*graph)->filter_count - 1]);
67 av_freep(&(*graph)->sink_links);68 av_freep(&(*graph)->sink_links);
68 av_freep(&(*graph)->scale_sws_opts);69 av_freep(&(*graph)->scale_sws_opts);
70 av_freep(&(*graph)->aresample_swr_opts);
69 av_freep(&(*graph)->filters);71 av_freep(&(*graph)->filters);
70 av_freep(graph);72 av_freep(graph);
71}73}
@@ -386,7 +388,7 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx) · 314 unmodified lines
386 snprintf(inst_name, sizeof(inst_name), "auto-inserted resampler %d",388 snprintf(inst_name, sizeof(inst_name), "auto-inserted resampler %d",
387 resampler_count++);389 resampler_count++);
388 if ((ret = avfilter_graph_create_filter(&convert, filter,390 if ((ret = avfilter_graph_create_filter(&convert, filter,
389 inst_name, NULL, NULL, graph)) < 0)391 inst_name, graph->aresample_swr_opts, NULL, graph)) < 0)
390 return ret;392 return ret;
391 break;393 break;
392 default:394 default:
libavfilter/avfiltergraph.h+2−0
@@ -32,6 +32,8 @@ typedef struct AVFilterGraph { · 31 unmodified lines
32 32
33 char *scale_sws_opts; ///< sws options to use for the auto-inserted scale filters33 char *scale_sws_opts; ///< sws options to use for the auto-inserted scale filters
34 34
35 char *aresample_swr_opts; ///< swr options to use for the auto-inserted aresample filters, Access ONLY through AVOptions
36
35 /**37 /**
36 * Private fields38 * Private fields
37 *39 *

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t