summaryrefslogtreecommitdiff
path: root/libavformat/wtvdec.c
diff options
context:
space:
mode:
authorDaniel Kucera <daniel.kucera@gmail.com>2017-06-05 20:28:30 +0200
committerwm4 <nfxjfg@googlemail.com>2017-10-13 17:23:54 +0200
commitfeed201849b8f9153ba815ade39329cd10a36623 (patch)
tree891a754bd9e42283b6ed8f49caa342f8b1837781 /libavformat/wtvdec.c
parent6b52c0b583b84aa5290f3c8a022deefe8dc2fed1 (diff)
libavformat/wtvdec: return AVERROR_EOF on EOF
Signed-off-by: Daniel Kucera <daniel.kucera@gmail.com> Signed-off-by: wm4 <nfxjfg@googlemail.com>
Diffstat (limited to 'libavformat/wtvdec.c')
-rw-r--r--libavformat/wtvdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c
index 27be5c9c04..301163bdcb 100644
--- a/libavformat/wtvdec.c
+++ b/libavformat/wtvdec.c
@@ -65,7 +65,7 @@ static int64_t seek_by_sector(AVIOContext *pb, int64_t sector, int64_t offset)
}
/**
- * @return bytes read, 0 on end of file, or <0 on error
+ * @return bytes read, AVERROR_EOF on end of file, or <0 on error
*/
static int wtvfile_read_packet(void *opaque, uint8_t *buf, int buf_size)
{
@@ -76,7 +76,7 @@ static int wtvfile_read_packet(void *opaque, uint8_t *buf, int buf_size)
if (wf->error || pb->error)
return -1;
if (wf->position >= wf->length || avio_feof(pb))
- return 0;
+ return AVERROR_EOF;
buf_size = FFMIN(buf_size, wf->length - wf->position);
while(nread < buf_size) {