mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
flacenc: never ever pass values >36bits to _set_total_samples_estimate()
Let's be paranoid and make sure we never pass a number that takes up more than 36 bits to _set_total_samples_estimate(), since libFLAC expects all the other bits to be zero, and if this is not the case neighbouring fields in the global stream info header may get messed up inadvertently, so that flac -d refuses to decode the stream. See #584455.
This commit is contained in:
parent
0de1f5357d
commit
53be1d33ca
1 changed files with 1 additions and 1 deletions
|
@ -633,7 +633,7 @@ gst_flac_enc_sink_setcaps (GstPad * pad, GstCaps * caps)
|
|||
|
||||
if (total_samples != GST_CLOCK_TIME_NONE)
|
||||
FLAC__stream_encoder_set_total_samples_estimate (flacenc->encoder,
|
||||
total_samples);
|
||||
MIN (total_samples, G_GUINT64_CONSTANT (0x0FFFFFFFFF)));
|
||||
|
||||
gst_flac_enc_set_metadata (flacenc);
|
||||
|
||||
|
|
Loading…
Reference in a new issue