mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-24 16:18:16 +00:00
discoverer: Use nominal bitrate if bitrate tag is unavailable
If the bitrate tag is unavailable, this falls back to the nominal bitrate tag instead, if that is present. https://bugzilla.gnome.org/show_bug.cgi?id=641860
This commit is contained in:
parent
fe59f50468
commit
e9ff48376b
1 changed files with 4 additions and 2 deletions
|
@ -598,7 +598,8 @@ collect_information (GstDiscoverer * dc, const GstStructure * st,
|
|||
if (gst_structure_id_has_field (st, _TAGS_QUARK)) {
|
||||
gst_structure_id_get (st, _TAGS_QUARK,
|
||||
GST_TYPE_STRUCTURE, &tags_st, NULL);
|
||||
if (gst_structure_get_uint (tags_st, GST_TAG_BITRATE, &utmp))
|
||||
if (gst_structure_get_uint (tags_st, GST_TAG_BITRATE, &utmp) ||
|
||||
gst_structure_get_uint (tags_st, GST_TAG_NOMINAL_BITRATE, &utmp))
|
||||
info->bitrate = utmp;
|
||||
|
||||
if (gst_structure_get_uint (tags_st, GST_TAG_MAXIMUM_BITRATE, &utmp))
|
||||
|
@ -650,7 +651,8 @@ collect_information (GstDiscoverer * dc, const GstStructure * st,
|
|||
if (gst_structure_id_has_field (st, _TAGS_QUARK)) {
|
||||
gst_structure_id_get (st, _TAGS_QUARK,
|
||||
GST_TYPE_STRUCTURE, &tags_st, NULL);
|
||||
if (gst_structure_get_uint (tags_st, GST_TAG_BITRATE, &utmp))
|
||||
if (gst_structure_get_uint (tags_st, GST_TAG_BITRATE, &utmp) ||
|
||||
gst_structure_get_uint (tags_st, GST_TAG_NOMINAL_BITRATE, &utmp))
|
||||
info->bitrate = utmp;
|
||||
|
||||
if (gst_structure_get_uint (tags_st, GST_TAG_MAXIMUM_BITRATE, &utmp))
|
||||
|
|
Loading…
Reference in a new issue