Skip to content

Commit

Permalink
Fix FFmpeg 4.0 causes omxplayer to hang-up at the end. (popcornmix#637)
Browse files Browse the repository at this point in the history
  • Loading branch information
jehutting authored and popcornmix committed Jan 2, 2019
1 parent 9ca4561 commit f06235c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion OMXReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,14 @@ static int dvd_file_read(void *h, uint8_t* buf, int size)
return -1;

XFILE::CFile *pFile = (XFILE::CFile *)h;
return pFile->Read(buf, size);
int ret = pFile->Read(buf, size);

#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(58,12,100)
if (ret == 0 && pFile->IsEOF())
ret = AVERROR_EOF;
#endif

return ret;
}

static offset_t dvd_file_seek(void *h, offset_t pos, int whence)
Expand Down

0 comments on commit f06235c

Please sign in to comment.