mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
avcodecmap: Only set the bitrate if we actually got it from the caps
Otherwise we set a random value from the stack as bitrate. The default (0) is a better choice and doesn't upset valgrind.
This commit is contained in:
parent
6655aabebc
commit
34fe6af6da
1 changed files with 2 additions and 2 deletions
|
@ -2366,8 +2366,8 @@ gst_ffmpeg_caps_to_smpfmt (const GstCaps * caps,
|
|||
gst_structure_get_int (structure, "channels", &context->channels);
|
||||
gst_structure_get_int (structure, "rate", &context->sample_rate);
|
||||
gst_structure_get_int (structure, "block_align", &context->block_align);
|
||||
gst_structure_get_int (structure, "bitrate", &bitrate);
|
||||
context->bit_rate = bitrate;
|
||||
if (gst_structure_get_int (structure, "bitrate", &bitrate))
|
||||
context->bit_rate = bitrate;
|
||||
|
||||
if (!raw)
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue