Skip to content

Commit eb52134

Browse files
committed
fix for fix :)
1 parent 5a71e88 commit eb52134

File tree

1 file changed

+4
-21
lines changed

1 file changed

+4
-21
lines changed

src/mitm.rs

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ use crate::mitm::sensor_source_service::Sensor;
2323
use crate::mitm::AudioStreamType::*;
2424
use crate::mitm::SensorMessageId::*;
2525
use crate::mitm::SensorType::*;
26+
use crate::mitm::VideoCodecResolutionType::VIDEO_1920x1080;
2627
use protobuf::text_format::print_to_string_pretty;
28+
use protobuf::EnumOrUnknown;
2729
use protobuf::{Enum, Message, MessageDyn};
2830
use protos::ControlMessageType::{self, *};
2931

@@ -359,27 +361,8 @@ pub async fn pkt_modify_hook(
359361
.iter_mut()
360362
.find(|svc| !svc.media_sink_service.video_configs.is_empty())
361363
{
362-
msg.services
363-
.retain(|svc| svc.media_sink_service.codec_resolution() == VIDEO_1920x1080);
364-
info!(
365-
"{} <yellow>{:?}</>: best codec retained",
366-
get_name(proxy_type),
367-
control.unwrap(),
368-
);
369-
/*
370-
// get previous/original value
371-
let prev_val = svc.media_sink_service.video_configs[0].density();
372-
// set new value
373-
svc.media_sink_service.as_mut().unwrap().video_configs[0]
374-
.set_density(dpi.into());
375-
info!(
376-
"{} <yellow>{:?}</>: replacing DPI[0] value: from <b>{}</> to <b>{}</>",
377-
get_name(proxy_type),
378-
control.unwrap(),
379-
prev_val,
380-
dpi
381-
);
382-
*/
364+
svc.media_sink_service.as_mut().unwrap().video_configs.remove(2);
365+
svc.media_sink_service.as_mut().unwrap().video_configs.remove(1);
383366
}
384367
}
385368

0 commit comments

Comments
 (0)