mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
qtmux: Fix signed floating point values writing
You would end up on some architectures with 0 being written out instead of the proper value. https://bugzilla.gnome.org/show_bug.cgi?id=649449
This commit is contained in:
parent
fc94b78fe1
commit
cca48a42c6
1 changed files with 4 additions and 3 deletions
|
@ -769,9 +769,10 @@ gst_qt_mux_add_3gp_location (GstQTMux * qtmux, const GstTagList * list,
|
|||
/* role */
|
||||
GST_WRITE_UINT8 (data, 0);
|
||||
/* long, lat, alt */
|
||||
GST_WRITE_UINT32_BE (data + 1, (guint32) (longitude * 65536.0));
|
||||
GST_WRITE_UINT32_BE (data + 5, (guint32) (latitude * 65536.0));
|
||||
GST_WRITE_UINT32_BE (data + 9, (guint32) (altitude * 65536.0));
|
||||
#define QT_WRITE_SFP32(data, fp) GST_WRITE_UINT32_BE(data, (guint32) ((gint) (fp * 65536.0)))
|
||||
QT_WRITE_SFP32 (data + 1, longitude);
|
||||
QT_WRITE_SFP32 (data + 5, latitude);
|
||||
QT_WRITE_SFP32 (data + 9, altitude);
|
||||
/* neither astronomical body nor notes */
|
||||
GST_WRITE_UINT16_BE (data + 13, 0);
|
||||
|
||||
|
|
Loading…
Reference in a new issue