changeset 5743:0c1e9df4e3cd libavformat

Attempt seeking to write EBML master sizes even if streamed Most EBML masters are much smaller than IO_BUFFER_SIZE and thus the size can be updated. This makes parsing the resulting files easier.
author conrad
date Thu, 04 Mar 2010 08:53:00 +0000
parents f50c86f67772
children a656843c86aa
files matroskaenc.c
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/matroskaenc.c	Wed Mar 03 23:27:34 2010 +0000
+++ b/matroskaenc.c	Thu Mar 04 08:53:00 2010 +0000
@@ -218,11 +218,8 @@
 {
     int64_t pos = url_ftell(pb);
 
-    // leave the unknown size for masters when streaming
-    if (url_is_streamed(pb))
+    if (url_fseek(pb, master.pos - master.sizebytes, SEEK_SET) < 0)
         return;
-
-    url_fseek(pb, master.pos - master.sizebytes, SEEK_SET);
     put_ebml_num(pb, pos - master.pos, master.sizebytes);
     url_fseek(pb, pos, SEEK_SET);
 }