diff options
author | Tom Rondeau | 2012-12-14 11:32:55 -0500 |
---|---|---|
committer | Tom Rondeau | 2012-12-14 11:32:55 -0500 |
commit | 057c4c67e785f36138a289ed1f5400cf8f8d55b5 (patch) | |
tree | 9f8911c8bad3b2f55da400f43af99a49927a4513 /gnuradio-core | |
parent | 8f7271cfe496346f34a6e7352ec0f597b79341a4 (diff) | |
download | gnuradio-057c4c67e785f36138a289ed1f5400cf8f8d55b5.tar.gz gnuradio-057c4c67e785f36138a289ed1f5400cf8f8d55b5.tar.bz2 gnuradio-057c4c67e785f36138a289ed1f5400cf8f8d55b5.zip |
core: When the file meta sink is closed by user, make sure the last header is properly updated.
Diffstat (limited to 'gnuradio-core')
-rw-r--r-- | gnuradio-core/src/lib/io/gr_file_meta_sink.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gnuradio-core/src/lib/io/gr_file_meta_sink.cc b/gnuradio-core/src/lib/io/gr_file_meta_sink.cc index 2b722bc61..9cec5bc28 100644 --- a/gnuradio-core/src/lib/io/gr_file_meta_sink.cc +++ b/gnuradio-core/src/lib/io/gr_file_meta_sink.cc @@ -131,8 +131,6 @@ gr_file_meta_sink::gr_file_meta_sink(size_t itemsize, const std::string &filenam gr_file_meta_sink::~gr_file_meta_sink() { - update_last_header(); - close(); if(d_fp) { @@ -196,6 +194,8 @@ void gr_file_meta_sink::close() { gruel::scoped_lock guard(d_mutex); // hold mutex for duration of this function + update_last_header(); + if(d_state == STATE_DETACHED) { if(d_new_hdr_fp) { fclose(d_new_hdr_fp); |