Set zm_packet.pts scaled to AV_TIME_BASE_Q.

pull/3186/head
Isaac Connor 2021-03-01 13:50:03 -05:00
parent c554a22374
commit a81e3d6e19
1 changed files with 1 additions and 0 deletions

View File

@ -213,6 +213,7 @@ int FfmpegCamera::Capture(ZMPacket &zm_packet) {
#endif
bytes += packet.size;
zm_packet.set_packet(&packet);
zm_packet.pts = av_rescale_q(packet.pts, mFormatContext->streams[packet.stream_index]->time_base, AV_TIME_BASE_Q);
zm_av_packet_unref(&packet);
return 1;
} // FfmpegCamera::Capture