Merge branch 'master' into pu/msgbox

This commit is contained in:
2016-11-13 16:04:39 +01:00
6 changed files with 15 additions and 14 deletions

View File

@@ -2207,7 +2207,7 @@ void CStreamRec::run()
AVPacket newpkt = pkt;
if (av_bitstream_filter_filter(bsfc, codec, NULL, &newpkt.data, &newpkt.size, pkt.data, pkt.size, pkt.flags & AV_PKT_FLAG_KEY) >= 0) {
av_free_packet(&pkt);
av_packet_unref(&pkt);
newpkt.buf = av_buffer_create(newpkt.data, newpkt.size, av_buffer_default_free, NULL, 0);
pkt = newpkt;
}
@@ -2216,7 +2216,7 @@ void CStreamRec::run()
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_free_packet(&pkt);
av_packet_unref(&pkt);
if (pkt.stream_index == stream_index) {
total += (double) 1000 * pkt.duration * av_q2d(ifcx->streams[stream_index]->time_base);