On Fri, 20 Jan 2012, Måns Rullgård wrote:

Martin Storsjö <[email protected]> writes:

Without this, the end of the file might not be
transmitted/written.
---
Sorry for not noticing this earlier...

 tools/aviocat.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tools/aviocat.c b/tools/aviocat.c
index c43c69d..183cdf70 100644
--- a/tools/aviocat.c
+++ b/tools/aviocat.c
@@ -89,6 +89,7 @@ int main(int argc, char **argv)
         }
     }

+    avio_flush(output);
     avio_close(output);
 fail:
     avio_close(input);
--

Why does avio_close() not flush the output?  That's how stdio works, so
it's natural to expect the same here.

That's a very good question - not sure if avio_close() is intended to be a "discard this and just close it quickly" function or a full graceful close. At the moment, I don't think of any good reason why it shouldn't flush by default when closing - I guess that we could get rid of a lot of extra avio_flushes in each muxer if we changed this.

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to