mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 00:32:57 -04:00
ffmpeg: Make read_packet return AVERROR_EOF
Newer versions of FFmpeg deprecate returning 0 to indicate EOF, and instead request use of AVERROR_EOF. The oldest supported versions of FFmpeg/libav will treat any error code the same as returning 0. Fixes #315
This commit is contained in:
parent
5c9705c21c
commit
e4c9526e08
@ -209,7 +209,7 @@ read_packet(void *opaque, uint8_t *buf, int size) {
|
|||||||
streampos remaining = self->_start + (streampos)self->_size - in->tellg();
|
streampos remaining = self->_start + (streampos)self->_size - in->tellg();
|
||||||
if (remaining < ssize) {
|
if (remaining < ssize) {
|
||||||
if (remaining <= 0) {
|
if (remaining <= 0) {
|
||||||
return 0;
|
return AVERROR_EOF;
|
||||||
}
|
}
|
||||||
|
|
||||||
ssize = remaining;
|
ssize = remaining;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user