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>
This commit is contained in:
4
ffmpeg.c
4
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);
|
||||
|
Reference in New Issue
Block a user