mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-03-15 06:50:27 +03:00
media-converter: Temporarily disable dumping audio to disk
It has some known issues, so don't waste resources on bad data. CW-Bug-Id: #19009
This commit is contained in:
parent
f3c3f79e35
commit
c3815897b8
@ -204,6 +204,14 @@ static DUMP_FOZDB: Lazy<Mutex<Option<fossilize::StreamArchive>>> = Lazy::new(||
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
static DUMPING_DISABLED: Lazy<bool> = Lazy::new(|| {
|
||||||
|
let v = match std::env::var("MEDIACONV_AUDIO_DONT_DUMP") {
|
||||||
|
Err(_) => { return false; },
|
||||||
|
Ok(c) => c,
|
||||||
|
};
|
||||||
|
return v != "0";
|
||||||
|
});
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
struct NeedTranscodeHead {
|
struct NeedTranscodeHead {
|
||||||
wmaversion: i32,
|
wmaversion: i32,
|
||||||
@ -368,25 +376,29 @@ impl StreamState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !found {
|
if !found {
|
||||||
gst_trace!(CAT, "recording stream id {}", self.cur_hash);
|
if *DUMPING_DISABLED {
|
||||||
db.write_entry(AUDIOCONV_FOZ_TAG_CODECINFO,
|
gst_trace!(CAT, "dumping disabled, so not recording stream id {}", self.cur_hash);
|
||||||
self.buffers[0].0,
|
} else {
|
||||||
&mut self.codec_info.as_ref().unwrap().serialize().as_slice(),
|
gst_trace!(CAT, "recording stream id {}", self.cur_hash);
|
||||||
fossilize::CRCCheck::WithCRC)
|
db.write_entry(AUDIOCONV_FOZ_TAG_CODECINFO,
|
||||||
.map_err(|e| gst_loggable_error!(CAT, "Unable to write stream header: {:?}", e))?;
|
self.buffers[0].0,
|
||||||
|
&mut self.codec_info.as_ref().unwrap().serialize().as_slice(),
|
||||||
|
fossilize::CRCCheck::WithCRC)
|
||||||
|
.map_err(|e| gst_loggable_error!(CAT, "Unable to write stream header: {:?}", e))?;
|
||||||
|
|
||||||
db.write_entry(AUDIOCONV_FOZ_TAG_STREAM,
|
db.write_entry(AUDIOCONV_FOZ_TAG_STREAM,
|
||||||
self.cur_hash,
|
self.cur_hash,
|
||||||
&mut StreamStateSerializer::new(self),
|
&mut StreamStateSerializer::new(self),
|
||||||
fossilize::CRCCheck::WithCRC)
|
fossilize::CRCCheck::WithCRC)
|
||||||
.map_err(|e| gst_loggable_error!(CAT, "Unable to write stream: {:?}", e))?;
|
.map_err(|e| gst_loggable_error!(CAT, "Unable to write stream: {:?}", e))?;
|
||||||
|
|
||||||
for buffer in self.buffers.iter() {
|
for buffer in self.buffers.iter() {
|
||||||
db.write_entry(AUDIOCONV_FOZ_TAG_AUDIODATA,
|
db.write_entry(AUDIOCONV_FOZ_TAG_AUDIODATA,
|
||||||
buffer.0,
|
buffer.0,
|
||||||
&mut buffer.1.as_slice(),
|
&mut buffer.1.as_slice(),
|
||||||
fossilize::CRCCheck::WithCRC)
|
fossilize::CRCCheck::WithCRC)
|
||||||
.map_err(|e| gst_loggable_error!(CAT, "Unable to write audio data: {:?}", e))?;
|
.map_err(|e| gst_loggable_error!(CAT, "Unable to write audio data: {:?}", e))?;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
3
proton
3
proton
@ -1002,6 +1002,9 @@ class Session:
|
|||||||
#disable XIM support until libx11 >= 1.7 is widespread
|
#disable XIM support until libx11 >= 1.7 is widespread
|
||||||
self.env.setdefault("WINE_ALLOW_XIM", "0")
|
self.env.setdefault("WINE_ALLOW_XIM", "0")
|
||||||
|
|
||||||
|
#temporarily disable dumping audio to disk
|
||||||
|
self.env.setdefault("MEDIACONV_AUDIO_DONT_DUMP", "1")
|
||||||
|
|
||||||
if "wined3d11" in self.compat_config:
|
if "wined3d11" in self.compat_config:
|
||||||
self.compat_config.add("wined3d")
|
self.compat_config.add("wined3d")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user