summaryrefslogtreecommitdiff
path: root/ffplay.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-03-19 15:35:30 +0100
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2011-03-19 17:30:35 +0100
commiteb4d1cb90e14250fc52c8fe73153b72603b029f8 (patch)
treeb366be5d868d9260dab9cdebe7da782c10b572df /ffplay.c
parent6820008a5cf810eca791477f5ef9d10883a88d35 (diff)
ffplay: add existence check on ic->pb in decode_thread()
Fix crash if ic->pb is NULL and ic->pb->error is evaluated. This happens for example with: ffplay photo.jpeg.
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffplay.c b/ffplay.c
index d45cce3ed1..8c34a22355 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2575,7 +2575,7 @@ static int decode_thread(void *arg)
if (ret < 0) {
if (ret == AVERROR_EOF || url_feof(ic->pb))
eof=1;
- if (ic->pb->error)
+ if (ic->pb && ic->pb->error)
break;
SDL_Delay(100); /* wait for user event */
continue;