Commit 362abbee authored by conrad's avatar conrad

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.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@22197 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent b2a0bbce
...@@ -218,11 +218,8 @@ static void end_ebml_master(ByteIOContext *pb, ebml_master master) ...@@ -218,11 +218,8 @@ static void end_ebml_master(ByteIOContext *pb, ebml_master master)
{ {
int64_t pos = url_ftell(pb); int64_t pos = url_ftell(pb);
// leave the unknown size for masters when streaming if (url_fseek(pb, master.pos - master.sizebytes, SEEK_SET) < 0)
if (url_is_streamed(pb))
return; return;
url_fseek(pb, master.pos - master.sizebytes, SEEK_SET);
put_ebml_num(pb, pos - master.pos, master.sizebytes); put_ebml_num(pb, pos - master.pos, master.sizebytes);
url_fseek(pb, pos, SEEK_SET); url_fseek(pb, pos, SEEK_SET);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment