gst-plugins-good: atoms_recovery: Handled buffer mapping failure

https://bugzilla.gnome.org/show_bug.cgi?id=789413
This commit is contained in:
Ashish Kumar 2017-10-24 20:12:29 +05:30 committed by Thiago Santos
parent 923b83a48c
commit 1aed3948a8

View file

@ -112,7 +112,9 @@ atoms_recov_write_ftyp_info (FILE * f, AtomFTYP * ftyp, GstBuffer * prefix)
if (prefix) {
GstMapInfo map;
gst_buffer_map (prefix, &map, GST_MAP_READ);
if (!gst_buffer_map (prefix, &map, GST_MAP_READ)) {
return FALSE;
}
if (fwrite (map.data, 1, map.size, f) != map.size) {
gst_buffer_unmap (prefix, &map);
return FALSE;