[FFmpeg-cvslog] tools/ffhash: read errno before calling functions which might change it
Michael Niedermayer
git at videolan.org
Sat Oct 25 16:39:21 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Oct 25 16:12:16 2014 +0200| [39a7ded22df3f0bae46706800da6eeede744c14f] | committer: Michael Niedermayer
tools/ffhash: read errno before calling functions which might change it
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=39a7ded22df3f0bae46706800da6eeede744c14f
---
tools/ffhash.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/ffhash.c b/tools/ffhash.c
index a9f71c2..6942527 100644
--- a/tools/ffhash.c
+++ b/tools/ffhash.c
@@ -94,9 +94,10 @@ static int check(char *file)
for (;;) {
int size = read(fd, buffer, SIZE);
if (size < 0) {
+ int err = errno;
close(fd);
finish();
- printf("+READ-FAILED: %s", strerror(errno));
+ printf("+READ-FAILED: %s", strerror(err));
ret = 2;
goto end;
} else if(!size)
More information about the ffmpeg-cvslog
mailing list