Commit e4202892 authored by Michael Niedermayer's avatar Michael Niedermayer

ffmpeg: Force a first_pts of 0 for the first configuration of -async use

This is very close to what the default does currently
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 394130ef
...@@ -198,6 +198,7 @@ typedef struct FilterGraph { ...@@ -198,6 +198,7 @@ typedef struct FilterGraph {
const char *graph_desc; const char *graph_desc;
AVFilterGraph *graph; AVFilterGraph *graph;
int reconfiguration;
InputFilter **inputs; InputFilter **inputs;
int nb_inputs; int nb_inputs;
......
...@@ -675,6 +675,8 @@ static int configure_input_audio_filter(FilterGraph *fg, InputFilter *ifilter, ...@@ -675,6 +675,8 @@ static int configure_input_audio_filter(FilterGraph *fg, InputFilter *ifilter,
av_strlcatf(args, sizeof(args), "async=%d", audio_sync_method); av_strlcatf(args, sizeof(args), "async=%d", audio_sync_method);
if (audio_drift_threshold != 0.1) if (audio_drift_threshold != 0.1)
av_strlcatf(args, sizeof(args), ":min_hard_comp=%f", audio_drift_threshold); av_strlcatf(args, sizeof(args), ":min_hard_comp=%f", audio_drift_threshold);
if (!fg->reconfiguration)
av_strlcatf(args, sizeof(args), ":first_pts=0");
AUTO_INSERT_FILTER_INPUT("-async", "aresample", args); AUTO_INSERT_FILTER_INPUT("-async", "aresample", args);
} }
...@@ -796,6 +798,7 @@ int configure_filtergraph(FilterGraph *fg) ...@@ -796,6 +798,7 @@ int configure_filtergraph(FilterGraph *fg)
} }
} }
fg->reconfiguration = 1;
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment