Skip to content

Commit

Permalink
fix bitrate flattening to not include bitrate again
Browse files Browse the repository at this point in the history
  • Loading branch information
ltn-chriskennedy committed Apr 22, 2024
1 parent 35dace4 commit 583f3ce
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license-file = "LICENSE"
homepage = "https://github.com/groovybits/rscap"
repository = "https://github.com/groovybits/rscap"
authors = ["Chris Kennedy"]
version = "0.6.4"
version = "0.6.5"
edition = "2021"

[lib]
Expand Down
2 changes: 1 addition & 1 deletion specs/rsprobe.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: rsprobe
Version: 0.6.4
Version: 0.6.5
Release: 1%{?dist}
Summary: MpegTS Stream Analysis Probe with Kafka and GStreamer
License: MIT
Expand Down
6 changes: 3 additions & 3 deletions src/bin/probe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ async fn send_to_kafka(
#[derive(Parser, Debug)]
#[clap(
author = "Chris Kennedy",
version = "0.6.4",
version = "0.6.5",
about = "MpegTS Stream Analysis Probe with Kafka and GStreamer"
)]
struct Args {
Expand Down Expand Up @@ -1305,13 +1305,13 @@ async fn rsprobe(running: Arc<AtomicBool>) {
// Initialize the bitrate_fields with default values of 0 for each media type
let mut bitrate_fields: AHashMap<String, u64> = media_types
.into_iter()
.map(|media_type| (format!("bitrate.{}.bitrate", media_type), 0))
.map(|media_type| (format!("bitrate.{}", media_type), 0))
.collect();

// Update the bitrate_fields with the actual bitrate values from pid_stream_types
for pid_stream_type in pid_stream_types.iter() {
let media_type = &pid_stream_type.media_type;
let bitrate_field = format!("bitrate.{}.bitrate", media_type);
let bitrate_field = format!("bitrate.{}", media_type);

let bitrate = bitrate_fields.entry(bitrate_field).or_insert(0);

Expand Down

0 comments on commit 583f3ce

Please sign in to comment.