1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-08 13:22:53 +02:00

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:
Stefano Sabatini 2011-03-19 15:35:30 +01:00
parent 6820008a5c
commit eb4d1cb90e

View File

@ -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;