1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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
This commit is contained in:
David Conrad 2010-03-04 08:53:00 +00:00
parent ab2a302834
commit 2529bb3019

View File

@ -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);
} }