Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2011-03-21 16:52:54 +0300
committerRonald S. Bultje <rsbultje@gmail.com>2011-03-21 22:08:09 +0300
commit648c79624fa70414dfb644fcb84b9de15e6568b0 (patch)
tree9114cd193cf97881952c15ca548a67e0446b49cf /ffplay.c
parenteb1e7f78ea9f8db391961d8fe30b3fae3ea20d5c (diff)
ffplay: Don't assume ic->pb is non-null
This fixes crashes on exit when plaing some RealRTSP streams (among other), e.g. rtsp://dl.lib.brown.edu:554/areserves/1093545294660883.mp3. These crashes have been present since 3e68b3ba7b015cf21. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ffplay.c b/ffplay.c
index 1e5244c805..ddd2c4d4f2 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2568,9 +2568,9 @@ static int decode_thread(void *arg)
}
ret = av_read_frame(ic, pkt);
if (ret < 0) {
- if (ret == AVERROR_EOF || ic->pb->eof_reached)
+ if (ret == AVERROR_EOF || (ic->pb && ic->pb->eof_reached))
eof=1;
- if (ic->pb->error)
+ if (ic->pb && ic->pb->error)
break;
SDL_Delay(100); /* wait for user event */
continue;