avformat/utils: fix order of buffers in timestamp update code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
950fb8acb4
commit
5047849584
@ -938,8 +938,8 @@ static AVPacketList *get_next_pkt(AVFormatContext *s, AVStream *st, AVPacketList
|
|||||||
{
|
{
|
||||||
if (pktl->next)
|
if (pktl->next)
|
||||||
return pktl->next;
|
return pktl->next;
|
||||||
if (pktl == s->parse_queue_end)
|
if (pktl == s->packet_buffer_end)
|
||||||
return s->packet_buffer;
|
return s->parse_queue;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -947,7 +947,7 @@ static void update_initial_timestamps(AVFormatContext *s, int stream_index,
|
|||||||
int64_t dts, int64_t pts, AVPacket *pkt)
|
int64_t dts, int64_t pts, AVPacket *pkt)
|
||||||
{
|
{
|
||||||
AVStream *st= s->streams[stream_index];
|
AVStream *st= s->streams[stream_index];
|
||||||
AVPacketList *pktl= s->parse_queue ? s->parse_queue : s->packet_buffer;
|
AVPacketList *pktl= s->packet_buffer ? s->packet_buffer : s->parse_queue;
|
||||||
int64_t pts_buffer[MAX_REORDER_DELAY+1];
|
int64_t pts_buffer[MAX_REORDER_DELAY+1];
|
||||||
int64_t shift;
|
int64_t shift;
|
||||||
int i, delay;
|
int i, delay;
|
||||||
@ -994,7 +994,7 @@ static void update_initial_timestamps(AVFormatContext *s, int stream_index,
|
|||||||
static void update_initial_durations(AVFormatContext *s, AVStream *st,
|
static void update_initial_durations(AVFormatContext *s, AVStream *st,
|
||||||
int stream_index, int duration)
|
int stream_index, int duration)
|
||||||
{
|
{
|
||||||
AVPacketList *pktl= s->parse_queue ? s->parse_queue : s->packet_buffer;
|
AVPacketList *pktl= s->packet_buffer ? s->packet_buffer : s->parse_queue;
|
||||||
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){
|
||||||
@ -1018,7 +1018,7 @@ static void update_initial_durations(AVFormatContext *s, AVStream *st,
|
|||||||
av_log(s, AV_LOG_DEBUG, "first_dts %s but no packet with dts in the queue\n", av_ts2str(st->first_dts));
|
av_log(s, AV_LOG_DEBUG, "first_dts %s but no packet with dts in the queue\n", av_ts2str(st->first_dts));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
pktl= s->parse_queue ? s->parse_queue : s->packet_buffer;
|
pktl= s->packet_buffer ? s->packet_buffer : s->parse_queue;
|
||||||
st->first_dts = cur_dts;
|
st->first_dts = cur_dts;
|
||||||
}else if(st->cur_dts != RELATIVE_TS_BASE)
|
}else if(st->cur_dts != RELATIVE_TS_BASE)
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user