Qt: Fix lossless video encoding

This commit is contained in:
Vicki Pfau 2018-09-18 13:59:13 -07:00
parent 751acd1637
commit 1aa256a7ee
1 changed files with 3 additions and 3 deletions

View File

@ -101,7 +101,7 @@ VideoView::VideoView(QWidget* parent)
.container = "MKV",
.vcodec = "h.264",
.acodec = "FLAC",
.vbr = 0,
.vbr = -1,
.abr = 0,
.dims = QSize(),
});
@ -181,7 +181,7 @@ void VideoView::updatePresets() {
.container = "MKV",
.vcodec = "h.264",
.acodec = "FLAC",
.vbr = 0,
.vbr = -1,
.abr = 0,
.dims = QSize(m_nativeWidth, m_nativeHeight)
});
@ -311,7 +311,7 @@ void VideoView::setAudioBitrate(int br, bool manual) {
}
void VideoView::setVideoBitrate(int br, bool manual) {
m_vbr = br * 1000;
m_vbr = br >= 0 ? br * 1000 : 0;
FFmpegEncoderSetVideo(&m_encoder, m_videoCodecCstr, m_vbr);
validateSettings();
if (manual) {