[FFmpeg-cvslog] ffplay: add existence check on ic->pb in decode_thread()

Stefano Sabatini git at videolan.org
Sat Mar 19 17:35:52 CET 2011


ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala at poste.it> | Sat Mar 19 15:35:30 2011 +0100| [eb4d1cb90e14250fc52c8fe73153b72603b029f8] | committer: Stefano Sabatini

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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eb4d1cb90e14250fc52c8fe73153b72603b029f8
---

 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;




More information about the ffmpeg-cvslog mailing list