summaryrefslogtreecommitdiff
path: root/libavformat/matroskaenc.c
diff options
context:
space:
mode:
authorDavid Conrad <lessen42@gmail.com>2010-03-04 08:53:00 +0000
committerDavid Conrad <lessen42@gmail.com>2010-03-04 08:53:00 +0000
commit2529bb3019a027c39d6ba7de3e7d4c7a49bdf384 (patch)
tree03da936aa5283538b809c982afd3b341f070a5e7 /libavformat/matroskaenc.c
parentab2a30283417b37f29c4da9ad4dd708e79b21446 (diff)
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. Originally committed as revision 22197 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r--libavformat/matroskaenc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index ad4189384f..0f74ad3fb8 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -218,11 +218,8 @@ static void end_ebml_master(ByteIOContext *pb, ebml_master master)
{
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);
}