changeset 3613:e961e9aa3767 libavformat

check url_fseek return value
author bcoudurier
date Thu, 31 Jul 2008 18:12:37 +0000
parents c6186d4ceda0
children 71fdc3f7c771
files raw.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
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;
 }