mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-23 04:24:35 +02:00
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:
parent
cbeaf67888
commit
4bfcedb33f
@ -893,6 +893,10 @@ typedef struct AVStream {
|
|||||||
*/
|
*/
|
||||||
int pts_wrap_behavior;
|
int pts_wrap_behavior;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Internal data to prevent doing update_initial_durations() twice
|
||||||
|
*/
|
||||||
|
int update_initial_durations_done;
|
||||||
} AVStream;
|
} AVStream;
|
||||||
|
|
||||||
AVRational av_stream_get_r_frame_rate(const AVStream *s);
|
AVRational av_stream_get_r_frame_rate(const AVStream *s);
|
||||||
|
@ -998,6 +998,9 @@ static void update_initial_durations(AVFormatContext *s, AVStream *st,
|
|||||||
int64_t cur_dts= RELATIVE_TS_BASE;
|
int64_t cur_dts= RELATIVE_TS_BASE;
|
||||||
|
|
||||||
if(st->first_dts != AV_NOPTS_VALUE){
|
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;
|
cur_dts= st->first_dts;
|
||||||
for(; pktl; pktl= get_next_pkt(s, st, pktl)){
|
for(; pktl; pktl= get_next_pkt(s, st, pktl)){
|
||||||
if(pktl->pkt.stream_index == stream_index){
|
if(pktl->pkt.stream_index == stream_index){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user