diff mbox

[FFmpeg-devel] libavformat/subfile: return AVERROR_EOF on EOF

Message ID 20170605183239.18806-1-daniel.kucera@gmail.com
State Accepted
Commit d4a900fad8b1fe23d304f508802147b200722251
Headers show

Commit Message

Daniel Kucera June 5, 2017, 6:32 p.m. UTC
Signed-off-by: Daniel Kucera <daniel.kucera@gmail.com>
---
 libavformat/subfile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Nicolas George June 15, 2017, 8:19 a.m. UTC | #1
Le septidi 17 prairial, an CCXXV, Daniel Kucera a écrit :
> Signed-off-by: Daniel Kucera <daniel.kucera@gmail.com>
> ---
>  libavformat/subfile.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/subfile.c b/libavformat/subfile.c
> index fa971e1902..497cf85211 100644
> --- a/libavformat/subfile.c
> +++ b/libavformat/subfile.c
> @@ -102,7 +102,7 @@ static int subfile_read(URLContext *h, unsigned char *buf, int size)
>      int ret;
>  
>      if (rest <= 0)
> -        return 0;
> +        return AVERROR_EOF;
>      size = FFMIN(size, rest);
>      ret = ffurl_read(c->h, buf, size);
>      if (ret >= 0)

LGTM, thanks.

Regards,
Michael Niedermayer June 17, 2017, 7:53 p.m. UTC | #2
On Thu, Jun 15, 2017 at 10:19:53AM +0200, Nicolas George wrote:
> Le septidi 17 prairial, an CCXXV, Daniel Kucera a écrit :
> > Signed-off-by: Daniel Kucera <daniel.kucera@gmail.com>
> > ---
> >  libavformat/subfile.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/libavformat/subfile.c b/libavformat/subfile.c
> > index fa971e1902..497cf85211 100644
> > --- a/libavformat/subfile.c
> > +++ b/libavformat/subfile.c
> > @@ -102,7 +102,7 @@ static int subfile_read(URLContext *h, unsigned char *buf, int size)
> >      int ret;
> >  
> >      if (rest <= 0)
> > -        return 0;
> > +        return AVERROR_EOF;
> >      size = FFMIN(size, rest);
> >      ret = ffurl_read(c->h, buf, size);
> >      if (ret >= 0)
> 
> LGTM, thanks.

applied

thx

[...]
diff mbox

Patch

diff --git a/libavformat/subfile.c b/libavformat/subfile.c
index fa971e1902..497cf85211 100644
--- a/libavformat/subfile.c
+++ b/libavformat/subfile.c
@@ -102,7 +102,7 @@  static int subfile_read(URLContext *h, unsigned char *buf, int size)
     int ret;
 
     if (rest <= 0)
-        return 0;
+        return AVERROR_EOF;
     size = FFMIN(size, rest);
     ret = ffurl_read(c->h, buf, size);
     if (ret >= 0)