mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 09:21:09 +02:00
record: use pkt after free have no effects
Origin commit data
------------------
Commit: 723db7d688
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2021-11-20 (Sat, 20 Nov 2021)
This commit is contained in:
@@ -2472,14 +2472,14 @@ void CStreamRec::run()
|
||||
pkt.pts = av_rescale_q(pkt.pts, ifcx->streams[pkt.stream_index]->time_base, ofcx->streams[pkt.stream_index]->time_base);
|
||||
pkt.dts = av_rescale_q(pkt.dts, ifcx->streams[pkt.stream_index]->time_base, ofcx->streams[pkt.stream_index]->time_base);
|
||||
|
||||
av_write_frame(ofcx, &pkt);
|
||||
av_packet_unref(&pkt);
|
||||
|
||||
if (pkt.stream_index == stream_index) {
|
||||
total += (double) 1000 * pkt.duration * av_q2d(ifcx->streams[stream_index]->time_base);
|
||||
//printf("PKT: duration %d (%f) total %f (ifcx->duration %016llx\n", pkt.duration, duration, total, ifcx->duration);
|
||||
}
|
||||
|
||||
av_write_frame(ofcx, &pkt);
|
||||
av_packet_unref(&pkt);
|
||||
|
||||
if (now == 0)
|
||||
WriteHeader(1000);
|
||||
now = time_monotonic();
|
||||
|
Reference in New Issue
Block a user