diff options
author | David Conrad <lessen42@gmail.com> | 2007-09-05 00:26:00 +0000 |
---|---|---|
committer | David Conrad <lessen42@gmail.com> | 2007-09-05 00:26:00 +0000 |
commit | ac9e1177b3ff5f35450f0c1379ca6ac777a19ffc (patch) | |
tree | 56f7092eb2dc784aa99565e865e5238275e761fd /libavformat/matroskaenc.c | |
parent | c301d5ae0ae1f5e884556da928ef49bbcfbbbf7f (diff) | |
download | ffmpeg-ac9e1177b3ff5f35450f0c1379ca6ac777a19ffc.tar.gz |
Don't seek when streamed
Originally committed as revision 10383 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r-- | libavformat/matroskaenc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 34e1d41925..c50c155a40 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -215,6 +215,10 @@ static void end_ebml_master(ByteIOContext *pb, ebml_master master) { offset_t pos = url_ftell(pb); + // leave the unknown size for masters when streaming + if (url_is_streamed(pb)) + return; + url_fseek(pb, master.pos - master.sizebytes, SEEK_SET); put_ebml_size(pb, pos - master.pos, master.sizebytes); url_fseek(pb, pos, SEEK_SET); @@ -767,6 +771,7 @@ static int mkv_write_trailer(AVFormatContext *s) end_ebml_master(pb, mkv->cluster); + if (!url_is_streamed(pb)) { cuespos = mkv_write_cues(pb, mkv->cues, s->nb_streams); second_seekhead = mkv_write_seekhead(pb, mkv->cluster_seekhead); @@ -790,6 +795,7 @@ static int mkv_write_trailer(AVFormatContext *s) put_ebml_binary(pb, MATROSKA_ID_SEGMENTUID, segment_uid, 16); } url_fseek(pb, currentpos, SEEK_SET); + } end_ebml_master(pb, mkv->segment); av_free(mkv->md5_ctx); |