OSDN Git Service
(root)
/
android-x86
/
frameworks-av.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03425d9
)
FileSource: FILE is not closed
author
You Kim
<you.kim72@gmail.com>
Fri, 14 Dec 2012 13:22:36 +0000
(22:22 +0900)
committer
You Kim
<you.kim72@gmail.com>
Fri, 14 Dec 2012 13:22:36 +0000
(22:22 +0900)
Add destructor to call fclose.
Change-Id: I765c56236f8df58af998439492b0b955ab57606f
media/libstagefright/mp4/FragmentedMP4Parser.cpp
patch
|
blob
|
history
diff --git
a/media/libstagefright/mp4/FragmentedMP4Parser.cpp
b/media/libstagefright/mp4/FragmentedMP4Parser.cpp
index
7fe4e63
..
451c837
100644
(file)
--- a/
media/libstagefright/mp4/FragmentedMP4Parser.cpp
+++ b/
media/libstagefright/mp4/FragmentedMP4Parser.cpp
@@
-132,6
+132,10
@@
struct FileSource : public FragmentedMP4Parser::Source {
CHECK(mFile != NULL);
}
+ virtual ~FileSource() {
+ fclose(mFile);
+ }
+
virtual ssize_t readAt(off64_t offset, void *data, size_t size) {
fseek(mFile, offset, SEEK_SET);
return fread(data, 1, size, mFile);