mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-25 12:12:50 +01:00
recording: Fix flush. We want to clear the whole queue...
This commit is contained in:
parent
3cec3b866d
commit
b2d9da0b4b
@ -1190,6 +1190,8 @@ namespace utils
|
||||
m_frames_to_encode.pop_front();
|
||||
m_mtx.unlock();
|
||||
|
||||
got_frame = true;
|
||||
|
||||
// Calculate presentation timestamp.
|
||||
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);
|
||||
|
||||
got_frame = true;
|
||||
|
||||
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));
|
||||
@ -1276,6 +1276,8 @@ namespace utils
|
||||
m_samples_to_encode.pop_front();
|
||||
m_audio_mtx.unlock();
|
||||
|
||||
got_sample = true;
|
||||
|
||||
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);
|
||||
@ -1303,7 +1305,6 @@ namespace utils
|
||||
}
|
||||
|
||||
audio_samples_sample_count = 0;
|
||||
got_sample = true;
|
||||
|
||||
if (int err = av_frame_make_writable(av.audio.frame); err < 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user