diff mbox

[FFmpeg-devel] lavf/libsmbclient: return AVERROR_EOF for EOF.

Message ID 20180830124327.26476-1-george@nsup.org
State Accepted
Commit b09a092edd55ab6185db4f29cf96aa5ab85484fe
Headers show

Commit Message

Nicolas George Aug. 30, 2018, 12:43 p.m. UTC
Fix trac ticket #7387.

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavformat/libsmbclient.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Untested, I do not have a SMB share at hand.

Comments

Nicolas George Aug. 30, 2018, 1:46 p.m. UTC | #1
Nicolas George (2018-08-30):
> Fix trac ticket #7387.
> 
> Signed-off-by: Nicolas George <george@nsup.org>
> ---
>  libavformat/libsmbclient.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 
> Untested, I do not have a SMB share at hand.

Confirmed to work on trac. Will push soon.

Regards,
Nicolas George Sept. 2, 2018, 4:44 p.m. UTC | #2
Nicolas George (2018-08-30):
> Confirmed to work on trac. Will push soon.

Pushed.

And backported to 4.0; hope I did not make any mistake, this is my first
backport.

Regards,
Jan Ekström Sept. 2, 2018, 4:51 p.m. UTC | #3
On Sun, Sep 2, 2018 at 7:44 PM, Nicolas George <george@nsup.org> wrote:
> Nicolas George (2018-08-30):
>> Confirmed to work on trac. Will push soon.
>
> Pushed.
>
> And backported to 4.0; hope I did not make any mistake, this is my first
> backport.
>

Hi,

I think that looks alright as far as back-port is concerned, although
I was advised to use `git cherry-pick -x HASH_IN_MASTER`, where the -x
adds the "(cherry-picked from commit HASH)" comment at the end of the
commit message.

Jan
Nicolas George Sept. 2, 2018, 5:03 p.m. UTC | #4
Jan Ekström (2018-09-02):
> I think that looks alright as far as back-port is concerned, although
> I was advised to use `git cherry-pick -x HASH_IN_MASTER`, where the -x
> adds the "(cherry-picked from commit HASH)" comment at the end of the
> commit message.

Ok, I'll try to remember this for the next time. Thanks.

Regards,
diff mbox

Patch

diff --git a/libavformat/libsmbclient.c b/libavformat/libsmbclient.c
index b68cd8bd79..3285868957 100644
--- a/libavformat/libsmbclient.c
+++ b/libavformat/libsmbclient.c
@@ -166,7 +166,7 @@  static int libsmbc_read(URLContext *h, unsigned char *buf, int size)
         return ret;
     }
 
-    return bytes_read;
+    return bytes_read ? bytes_read : AVERROR_EOF;
 }
 
 static int libsmbc_write(URLContext *h, const unsigned char *buf, int size)