atomsrecovery: Error out when fseek() fails instead of silently ignoring
authorSebastian Dröge <sebastian@centricular.com>
Mon, 27 Mar 2017 08:43:31 +0000 (11:43 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 27 Mar 2017 08:43:57 +0000 (11:43 +0300)
CID 1403262

gst/isomp4/atomsrecovery.c

index fe46ce5..24bc31c 100644 (file)
@@ -673,8 +673,11 @@ moov_recov_parse_trak (MoovRecovFile * moovrf, TrakRecovData * trakrd)
   if (!moov_recov_parse_mdia (moovrf, trakrd))
     return FALSE;
 
-  fseek (moovrf->file, (long int) trakrd->mdia_file_offset + trakrd->mdia_size,
-      SEEK_SET);
+  if (fseek (moovrf->file,
+          (long int) trakrd->mdia_file_offset + trakrd->mdia_size,
+          SEEK_SET) != 0)
+    return FALSE;
+
   trakrd->extra_atoms_offset = ftell (moovrf->file);
   trakrd->extra_atoms_size = size - (trakrd->extra_atoms_offset - offset);