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.
This commit is contained in:
parent
6820008a5c
commit
eb4d1cb90e
2
ffplay.c
2
ffplay.c
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user