Skip to content

Commit

Permalink
Merge pull request #17 from slateteams/fix/negative-timestamp
Browse files Browse the repository at this point in the history
fix: handle negative timestamp
  • Loading branch information
ForeverSc authored Oct 28, 2024
2 parents 644c99a + c2f6844 commit 2acb574
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/web-demuxer/web_demuxer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void gen_web_packet(WebAVPacket &web_packet, AVPacket *packet, AVStream *stream)
double packet_timestamp = packet->pts * av_q2d(stream->time_base);

web_packet.keyframe = packet->flags & AV_PKT_FLAG_KEY;
web_packet.timestamp = packet_timestamp > 0 ? packet_timestamp : 0;
web_packet.timestamp = packet_timestamp;
web_packet.duration = packet->duration * av_q2d(stream->time_base);
web_packet.size = packet->size;
if (packet->size > 0)
Expand Down

0 comments on commit 2acb574

Please sign in to comment.