diff options
author | Peter Ross <pross@xvid.org> | 2012-11-07 16:51:51 +1100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-07 13:42:01 +0100 |
commit | b50759cd6b487ea0529af57b09fb46712f66c378 (patch) | |
tree | 5e160333a30332b13ec1e4be9bb47f54414c84c2 /libavformat/wtvenc.c | |
parent | fdfbb793c313ddd069581c0140eff43d9f1d69f9 (diff) | |
download | ffmpeg-b50759cd6b487ea0529af57b09fb46712f66c378.tar.gz |
wtvenc: do not emit stream2 and DSATTRIB_TRANSPORT_PROPERTY chunks; these are not required for playback
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/wtvenc.c')
-rw-r--r-- | libavformat/wtvenc.c | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/libavformat/wtvenc.c b/libavformat/wtvenc.c index 1efa9c6c18..f79b96fda1 100644 --- a/libavformat/wtvenc.c +++ b/libavformat/wtvenc.c @@ -288,31 +288,16 @@ static void write_sync(AVFormatContext *s) wctx->last_chunk_pos = last_chunk_pos; } -static void write_DSATTRIB_TRANSPORT_PROPERTIES_init(AVFormatContext *s, int stream_index) -{ - AVIOContext *pb = s->pb; - write_chunk_header2(s, &ff_DSATTRIB_TRANSPORT_PROPERTIES, 0x80000000 | stream_index); - avio_wl64(pb, stream_index); - avio_wl64(pb, -1); - avio_wl64(pb, 0); - finish_chunk(s); -} - -static int write_stream_data(AVFormatContext *s, AVStream *st, int flag) +static int write_stream_data(AVFormatContext *s, AVStream *st) { AVIOContext *pb = s->pb; int ret; - if (!flag) { write_chunk_header2(s, &ff_SBE2_STREAM_DESC_EVENT, 0x80000000 | (st->index + INDEX_BASE)); avio_wl32(pb, 0x00000001); avio_wl32(pb, st->index + INDEX_BASE); //stream_id avio_wl32(pb, 0x00000001); write_pad(pb, 8); - } else { - write_chunk_header2(s, &ff_stream2_guid, 0x80000000 | (st->index + INDEX_BASE)); - write_pad(pb, 4); - } ret = write_stream_codec_info(s, st); if (ret < 0) { @@ -364,28 +349,19 @@ static int write_header(AVFormatContext *s) av_log(s, AV_LOG_ERROR, "write stream codec failed codec_type(0x%x)\n", st->codec->codec_type); return -1; } - if (i + 1 < s->nb_streams) { + if (!i) write_sync(s); - } } for (i = 0; i < s->nb_streams; i++) { st = s->streams[i]; - ret = write_stream_data(s, st, 0); + ret = write_stream_data(s, st); if (ret < 0) { av_log(s, AV_LOG_ERROR, "write stream data failed codec_type(0x%x)\n", st->codec->codec_type); return -1; } - ret = write_stream_data(s, st, 1); - if (ret < 0) { - av_log(s, AV_LOG_ERROR, "write stream2 data failed codec_type(0x%x)\n", st->codec->codec_type); - return -1; - } } - for (i = 0; i < s->nb_streams; i++) - write_DSATTRIB_TRANSPORT_PROPERTIES_init(s, INDEX_BASE + i); - if (wctx->nb_index) write_index(s); |