[FFmpeg-devel] [PATCH] ffplay: add existence check on ic->pb in decode_thread()
Stefano Sabatini
stefano.sabatini-lala at poste.it
Sat Mar 19 15:44:26 CET 2011
Fix crash if ic->pb is NULL and ic->pb->error is evaluated. This
happens for example with: ffplay photo.jpeg.
---
ffplay.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ffplay.c b/ffplay.c
index d45cce3..8c34a22 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;
--
1.7.2.3
More information about the ffmpeg-devel
mailing list