Guess the duration before converting video and write guessed duration
into flv header.
Patch by Justin Johnson, justin D johnson3 A gmail
The change to ffmpeg.c is wrong as input and output files arent connected 1:1
(i seem to have missed that)
Also it can segfault see ([FFmpeg-devel] rtp streaming x264+audio issues (and some ideas to fix them))
Originally committed as revision 21652 to svn://svn.ffmpeg.org/ffmpeg/trunk
ist->is_start = 1;
}
- /* set the duration of the output to the duration of the input
- * if the output ends up being different, it'll be corrected later */
- for (i=0;i<nb_output_files;i++) {
- AVFormatContext *out_file = output_files[i];
- AVFormatContext *in_file = input_files[i];
-
- if (recording_time != INT64_MAX) {
- out_file->duration = recording_time / 1000000 * AV_TIME_BASE;
- } else {
- out_file->duration = in_file->duration;
- }
- }
-
/* set meta data information from input file if required */
for (i=0;i<nb_meta_data_maps;i++) {
AVFormatContext *out_file;