mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 21:41:26 +12:00
recording: Fix flush. We want to clear the whole queue...
This commit is contained in:
parent
3cec3b866d
commit
b2d9da0b4b
1 changed files with 4 additions and 3 deletions
|
@ -1190,6 +1190,8 @@ namespace utils
|
||||||
m_frames_to_encode.pop_front();
|
m_frames_to_encode.pop_front();
|
||||||
m_mtx.unlock();
|
m_mtx.unlock();
|
||||||
|
|
||||||
|
got_frame = true;
|
||||||
|
|
||||||
// Calculate presentation timestamp.
|
// Calculate presentation timestamp.
|
||||||
const s64 pts = get_pts(frame_data.timestamp_ms);
|
const s64 pts = get_pts(frame_data.timestamp_ms);
|
||||||
|
|
||||||
|
@ -1202,8 +1204,6 @@ namespace utils
|
||||||
{
|
{
|
||||||
media_log.trace("video_encoder: adding new frame. timestamp=%d", frame_data.timestamp_ms);
|
media_log.trace("video_encoder: adding new frame. timestamp=%d", frame_data.timestamp_ms);
|
||||||
|
|
||||||
got_frame = true;
|
|
||||||
|
|
||||||
if (int err = av_frame_make_writable(av.video.frame); err < 0)
|
if (int err = av_frame_make_writable(av.video.frame); err < 0)
|
||||||
{
|
{
|
||||||
media_log.error("video_encoder: av_frame_make_writable failed. Error: %d='%s'", err, av_error_to_string(err));
|
media_log.error("video_encoder: av_frame_make_writable failed. Error: %d='%s'", err, av_error_to_string(err));
|
||||||
|
@ -1276,6 +1276,8 @@ namespace utils
|
||||||
m_samples_to_encode.pop_front();
|
m_samples_to_encode.pop_front();
|
||||||
m_audio_mtx.unlock();
|
m_audio_mtx.unlock();
|
||||||
|
|
||||||
|
got_sample = true;
|
||||||
|
|
||||||
if (sample_data.channels != av.audio.frame->ch_layout.nb_channels)
|
if (sample_data.channels != av.audio.frame->ch_layout.nb_channels)
|
||||||
{
|
{
|
||||||
fmt::throw_exception("video_encoder: Audio sample channel count %d does not match frame channel count %d", sample_data.channels, av.audio.frame->ch_layout.nb_channels);
|
fmt::throw_exception("video_encoder: Audio sample channel count %d does not match frame channel count %d", sample_data.channels, av.audio.frame->ch_layout.nb_channels);
|
||||||
|
@ -1303,7 +1305,6 @@ namespace utils
|
||||||
}
|
}
|
||||||
|
|
||||||
audio_samples_sample_count = 0;
|
audio_samples_sample_count = 0;
|
||||||
got_sample = true;
|
|
||||||
|
|
||||||
if (int err = av_frame_make_writable(av.audio.frame); err < 0)
|
if (int err = av_frame_make_writable(av.audio.frame); err < 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue