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)
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;
......
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