From 0a3bb25a87c054ffcf6271a961bd0756317875e2 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 20 May 2022 13:47:31 -0400 Subject: [PATCH 1/2] Don't allow setting progressbar to 0 --- web/skins/classic/views/js/event.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web/skins/classic/views/js/event.js b/web/skins/classic/views/js/event.js index 0b8efe075..7aabc3c28 100644 --- a/web/skins/classic/views/js/event.js +++ b/web/skins/classic/views/js/event.js @@ -97,7 +97,6 @@ function setAlarmCues(data) { } else if (!data.frames) { Error('No data.frames in setAlarmCues for event ' + eventData.Id); } else { - console.log(data); cueFrames = data.frames; alarmSpans = renderAlarmCues(vid ? $j("#videoobj") : $j("#evtStream"));//use videojs width or zms width $j(".alarmCue").html(alarmSpans); @@ -735,7 +734,11 @@ function videoEvent() { // Called on each event load because each event can be a different width function drawProgressBar() { var barWidth = $j('#evtStream').width(); - $j('#progressBar').css('width', barWidth); + if (barWidth) { + $j('#progressBar').css('width', barWidth); + } else { + console.log("No bar width: " + barWidth); + } } // Shows current stream progress. From 3f2de7a45bc331f1686672f66143cc9523bda847 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 12 May 2022 12:56:40 -0400 Subject: [PATCH 2/2] Fix inverted logic breaking audio --- src/zm_videostore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zm_videostore.cpp b/src/zm_videostore.cpp index 94c3c63d1..094fff26a 100644 --- a/src/zm_videostore.cpp +++ b/src/zm_videostore.cpp @@ -1144,7 +1144,7 @@ int VideoStore::writeAudioFramePacket(const std::shared_ptr &zm_packet int ret; ZM_DUMP_STREAM_PACKET(audio_in_stream, (*ipkt), "input packet"); - if (audio_first_dts != AV_NOPTS_VALUE) { + if (audio_first_dts == AV_NOPTS_VALUE) { audio_first_dts = ipkt->dts; audio_next_pts = audio_out_ctx->frame_size; Debug(3, "audio first_dts to %" PRId64, audio_first_dts);