Commit eb4d1cb9 authored by Stefano Sabatini's avatar 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.
parent 6820008a
...@@ -2575,7 +2575,7 @@ static int decode_thread(void *arg) ...@@ -2575,7 +2575,7 @@ static int decode_thread(void *arg)
if (ret < 0) { if (ret < 0) {
if (ret == AVERROR_EOF || url_feof(ic->pb)) if (ret == AVERROR_EOF || url_feof(ic->pb))
eof=1; eof=1;
if (ic->pb->error) if (ic->pb && ic->pb->error)
break; break;
SDL_Delay(100); /* wait for user event */ SDL_Delay(100); /* wait for user event */
continue; continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment