diff raw.c @ 3613:e961e9aa3767 libavformat

check url_fseek return value
author bcoudurier
date Thu, 31 Jul 2008 18:12:37 +0000
parents 68e5f9adb0f4
children 900a232fc55e
line wrap: on
line diff
--- a/raw.c	Thu Jul 31 18:02:55 2008 +0000
+++ b/raw.c	Thu Jul 31 18:12:37 2008 +0000
@@ -221,7 +221,7 @@
                   int stream_index, int64_t timestamp, int flags)
 {
     AVStream *st;
-    int block_align, byte_rate;
+    int block_align, byte_rate, ret;
     int64_t pos;
 
     st = s->streams[0];
@@ -243,7 +243,8 @@
 
     /* recompute exact position */
     st->cur_dts = av_rescale(pos, st->time_base.den, byte_rate * (int64_t)st->time_base.num);
-    url_fseek(s->pb, pos + s->data_offset, SEEK_SET);
+    if ((ret = url_fseek(s->pb, pos + s->data_offset, SEEK_SET)) < 0)
+        return ret;
     return 0;
 }