Commit b8a1b880 authored by John Brooks's avatar John Brooks Committed by Martin Storsjö

rtpdec: Simplify finalize_packet

Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent b911518d
......@@ -421,7 +421,10 @@ static void finalize_packet(RTPDemuxContext *s, AVPacket *pkt, uint32_t timestam
{
if (pkt->pts != AV_NOPTS_VALUE || pkt->dts != AV_NOPTS_VALUE)
return; /* Timestamp already set by depacketizer */
if (s->last_rtcp_ntp_time != AV_NOPTS_VALUE && timestamp != RTP_NOTS_VALUE) {
if (timestamp == RTP_NOTS_VALUE)
return;
if (s->last_rtcp_ntp_time != AV_NOPTS_VALUE) {
int64_t addend;
int delta_timestamp;
......@@ -433,8 +436,7 @@ static void finalize_packet(RTPDemuxContext *s, AVPacket *pkt, uint32_t timestam
delta_timestamp;
return;
}
if (timestamp == RTP_NOTS_VALUE)
return;
if (!s->base_timestamp)
s->base_timestamp = timestamp;
pkt->pts = s->range_start_offset + timestamp - s->base_timestamp;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment