[FFmpeg-devel] [PATCH 1/5] concatdec: add support for specifying inpoint of files
Marton Balint
cus at passwd.hu
Thu Jul 16 21:43:22 CEST 2015
On Thu, 16 Jul 2015, Nicolas George wrote:
> Le tridi 23 messidor, an CCXXIII, Marton Balint a écrit :
>> Signed-off-by: Marton Balint <cus at passwd.hu>
>> ---
>> doc/demuxers.texi | 17 +++++++++++++++++
>> libavformat/concatdec.c | 39 ++++++++++++++++++++++++++-------------
>> 2 files changed, 43 insertions(+), 13 deletions(-)
>>
[...]
>> cat->files[fileno - 1].start_time +
>> cat->files[fileno - 1].duration;
>> + file->file_start_time = (avf->start_time == AV_NOPTS_VALUE) ? 0 : avf->start_time;
>
>> + file->file_inpoint = (file->file_inpoint == AV_NOPTS_VALUE) ? file->file_start_time : file->inpoint;
>
> If I read this correctly, file->file_inpoint is always set.
Correct.
[...]
>> cat->cur_file->duration = cat->avf->duration;
>
>> + if (cat->cur_file->inpoint != AV_NOPTS_VALUE)
>
> ... then this test is always true. Is it on purpose ?
Yes it is, because the check is done on file->inpoint (the inpoint the
user provided) not file->file_inpoint which is the pre-calculated inpoint
of the file.
>
>> + cat->cur_file->duration -= (cat->cur_file->inpoint - cat->cur_file->file_start_time);
>> + }
>>
>
> LGTM apart from that.
Ok, thanks. I will send the merge request to Michael.
Regards,
Marton
More information about the ffmpeg-devel
mailing list