Do not try to decode video when EOF is reached
Do not try to decode video when EOF is reached

When the video stream socket is closed and read_packey() returns -1,
av_read_frame() still returns 0.

To detect EOF, check the flag eof_reached in the AVIOContext.

This avoids garbage errors on closing.

Genymobile/scrcpy,Genymobile/scrcpy,Genymobile/scrcpy