fix: initialize EncodingParams enum members
format_, video_codec_, audio_codec_, subtitle_sidecar_fmt_ and subtitles_codec_ were left indeterminate by the constructor; reading them before the corresponding Enable* call was UB. Initialize to the kFormatCount/kCodecCount invalid sentinels.
This commit is contained in:
+5
-5
@@ -268,10 +268,10 @@ private:
|
|||||||
bool LoadV1(QXmlStreamReader *reader);
|
bool LoadV1(QXmlStreamReader *reader);
|
||||||
|
|
||||||
QString filename_;
|
QString filename_;
|
||||||
ExportFormat::Format format_;
|
ExportFormat::Format format_ = ExportFormat::kFormatCount;
|
||||||
|
|
||||||
bool video_enabled_;
|
bool video_enabled_;
|
||||||
ExportCodec::Codec video_codec_;
|
ExportCodec::Codec video_codec_ = ExportCodec::kCodecCount;
|
||||||
VideoParams video_params_;
|
VideoParams video_params_;
|
||||||
QHash<QString, QString> video_opts_;
|
QHash<QString, QString> video_opts_;
|
||||||
int64_t video_bit_rate_;
|
int64_t video_bit_rate_;
|
||||||
@@ -284,14 +284,14 @@ private:
|
|||||||
ColorTransform color_transform_;
|
ColorTransform color_transform_;
|
||||||
|
|
||||||
bool audio_enabled_;
|
bool audio_enabled_;
|
||||||
ExportCodec::Codec audio_codec_;
|
ExportCodec::Codec audio_codec_ = ExportCodec::kCodecCount;
|
||||||
AudioParams audio_params_;
|
AudioParams audio_params_;
|
||||||
int64_t audio_bit_rate_;
|
int64_t audio_bit_rate_;
|
||||||
|
|
||||||
bool subtitles_enabled_;
|
bool subtitles_enabled_;
|
||||||
bool subtitles_are_sidecar_;
|
bool subtitles_are_sidecar_;
|
||||||
ExportFormat::Format subtitle_sidecar_fmt_;
|
ExportFormat::Format subtitle_sidecar_fmt_ = ExportFormat::kFormatCount;
|
||||||
ExportCodec::Codec subtitles_codec_;
|
ExportCodec::Codec subtitles_codec_ = ExportCodec::kCodecCount;
|
||||||
|
|
||||||
rational export_length_;
|
rational export_length_;
|
||||||
VideoScalingMethod video_scaling_method_;
|
VideoScalingMethod video_scaling_method_;
|
||||||
|
|||||||
Reference in New Issue
Block a user