summaryrefslogtreecommitdiff
authorMichael Niedermayer <michaelni@gmx.at>2013-02-25 02:00:58 (GMT)
committer Michael Niedermayer <michaelni@gmx.at>2013-02-25 03:39:26 (GMT)
commite42028925bddfdfe46dcd2b7312148379ef4d62e (patch)
treeb29f2179efb3fd8b88b5deb9a3463f6e84563504
parent394130efe32f85c1f0582094add4376e32ebf20c (diff)
downloadffmpeg-e42028925bddfdfe46dcd2b7312148379ef4d62e.zip
ffmpeg-e42028925bddfdfe46dcd2b7312148379ef4d62e.tar.gz
ffmpeg-e42028925bddfdfe46dcd2b7312148379ef4d62e.tar.bz2
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: Michael Niedermayer <michaelni@gmx.at>
Diffstat
-rw-r--r--ffmpeg.h1
-rw-r--r--ffmpeg_filter.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/ffmpeg.h b/ffmpeg.h
index d8a963e..b89a5ac 100644
--- a/ffmpeg.h
+++ b/ffmpeg.h
@@ -198,6 +198,7 @@ typedef struct FilterGraph {
const char *graph_desc;
AVFilterGraph *graph;
+ int reconfiguration;
InputFilter **inputs;
int nb_inputs;
diff --git a/ffmpeg_filter.c b/ffmpeg_filter.c
index 7a9efea..1919f78 100644
--- a/ffmpeg_filter.c
+++ b/ffmpeg_filter.c
@@ -675,6 +675,8 @@ static int configure_input_audio_filter(FilterGraph *fg, InputFilter *ifilter,
av_strlcatf(args, sizeof(args), "async=%d", audio_sync_method);
if (audio_drift_threshold != 0.1)
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);
}
@@ -796,6 +798,7 @@ int configure_filtergraph(FilterGraph *fg)
}
}
+ fg->reconfiguration = 1;
return 0;
}