diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-08-18 10:20:25 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-08-18 10:56:08 +0200 |
commit | edae3dbf1d9d7d76af961914c07998eb7bbb482b (patch) | |
tree | caded6febf91793f858df78f1f7bed6430c88c5e /ffmpeg.c | |
parent | 2f53fce3b193beeffdcd1ecf1bf7c80a4e3dc388 (diff) | |
parent | b490f0c2bcec9d66d8878187f7e6661017e6d398 (diff) | |
download | ffmpeg-edae3dbf1d9d7d76af961914c07998eb7bbb482b.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master: (23 commits)
h264: hide reference frame errors unless requested
swscale: split hScale() function pointer into h[cy]Scale().
Move clipd macros to x86util.asm.
avconv: reindent.
avconv: rescue poor abused start_time global.
avconv: rescue poor abused recording_time global.
avconv: merge two loops in output_packet().
avconv: fix broken indentation.
avconv: get rid of the arbitrary MAX_FILES limit.
avconv: get rid of the output_streams_for_file vs. ost_table schizophrenia
avconv: add a wrapper for output AVFormatContexts and merge output_opts into it
avconv: make itsscale syntax consistent with other options.
avconv: factor out adding input streams.
avconv: Factorize combining auto vsync with format.
avconv: Factorize video resampling.
avconv: Don't unnecessarily convert ipts to a double.
ffmpeg: remove unsed variable nopts
RV3/4 parser: remove unused variable 'off'
add XMV demuxer
rmdec: parse FPS in RealMedia properly
...
Conflicts:
avconv.c
libavformat/version.h
libswscale/swscale.c
tests/ref/fate/lmlm4-demux
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 23 |
1 files changed, 8 insertions, 15 deletions
@@ -736,7 +736,6 @@ static int read_ffserver_streams(AVFormatContext *s, const char *filename) { int i, err; AVFormatContext *ic = NULL; - int nopts = 0; err = avformat_open_input(&ic, filename, NULL, NULL); if (err < 0) @@ -768,9 +767,6 @@ static int read_ffserver_streams(AVFormatContext *s, const char *filename) } else choose_pixel_fmt(st, codec); } - - if(st->codec->flags & CODEC_FLAG_BITEXACT) - nopts = 1; } av_close_input_file(ic); @@ -1725,6 +1721,14 @@ static int output_packet(InputStream *ist, int ist_index, int frame_size; ost = ost_table[i]; + + /* finish if recording time exhausted */ + if (recording_time != INT64_MAX && + av_compare_ts(ist->pts, AV_TIME_BASE_Q, recording_time + start_time, (AVRational){1, 1000000}) + >= 0) { + ist->is_past_recording_time = 1; + continue; + } if (ost->source_index == ist_index) { #if CONFIG_AVFILTER frame_available = ist->st->codec->codec_type != AVMEDIA_TYPE_VIDEO || @@ -2804,17 +2808,6 @@ static int transcode(AVFormatContext **output_files, } } - /* finish if recording time exhausted */ - if (recording_time != INT64_MAX && - (pkt.pts != AV_NOPTS_VALUE ? - av_compare_ts(pkt.pts, ist->st->time_base, recording_time + start_time, (AVRational){1, 1000000}) - : - av_compare_ts(ist->pts, AV_TIME_BASE_Q, recording_time + start_time, (AVRational){1, 1000000}) - )>= 0) { - ist->is_past_recording_time = 1; - goto discard_packet; - } - //fprintf(stderr,"read #%d.%d size=%d\n", ist->file_index, ist->st->index, pkt.size); if (output_packet(ist, ist_index, ost_table, nb_ostreams, &pkt) < 0) { |