avformat: dont run update_initial_duration() twice

This should avoid floods of first_dts not matching debug messages

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2013-12-31 08:36:14 +01:00
parent cbeaf67888
commit 4bfcedb33f
2 changed files with 7 additions and 0 deletions

View File

@@ -998,6 +998,9 @@ static void update_initial_durations(AVFormatContext *s, AVStream *st,
int64_t cur_dts= RELATIVE_TS_BASE;
if(st->first_dts != AV_NOPTS_VALUE){
if (st->update_initial_durations_done)
return;
st->update_initial_durations_done = 1;
cur_dts= st->first_dts;
for(; pktl; pktl= get_next_pkt(s, st, pktl)){
if(pktl->pkt.stream_index == stream_index){