Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-09-27 05:37:27 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-09-27 05:52:31 +0400
commit65f7aee63b6283a2336d03046faa37f2391d98e0 (patch)
tree4d4e8cceeb08c916f0b6d73a032a8ccc9f10be26 /ffmpeg.c
parentd37044647f83f53a1cb711ea4655b944ff4af0e5 (diff)
ffmpeg: add option to control copying of frames prior to start.
Normally we discard things prior to the intended start for stream copy this is not always possible, and its not done by default this option allows discarding to be enabled this is primarely usefull when transcoding a video and stream copying an audio stream. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 7621e9d997..3eb15a6494 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1340,6 +1340,10 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
!ost->copy_initial_nonkeyframes)
return;
+ if (!ost->frame_number && ist->pts < of->start_time &&
+ !ost->copy_prior_start)
+ return;
+
if (of->recording_time != INT64_MAX &&
ist->pts >= of->recording_time + of->start_time) {
close_output_stream(ost);