summaryrefslogtreecommitdiff
path: root/libavformat/asfenc.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-03-21 17:02:30 -0300
committerJames Almer <jamrial@gmail.com>2017-03-21 17:02:30 -0300
commit4de591e6fb7361bd417dcd9563672ed0ad8b361b (patch)
treeff6b5c51a4891b49f61d53b88bdfb27cc6a89579 /libavformat/asfenc.c
parent423375d4f06ae7103e575a31c23e62e3ba440845 (diff)
parent83548fe894cdb455cc127f754d09905b6d23c173 (diff)
Merge commit '83548fe894cdb455cc127f754d09905b6d23c173'
* commit '83548fe894cdb455cc127f754d09905b6d23c173': lavf: fix usage of AVIOContext.seekable Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/asfenc.c')
-rw-r--r--libavformat/asfenc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c
index 19dee3d528..1b67143afd 100644
--- a/libavformat/asfenc.c
+++ b/libavformat/asfenc.c
@@ -473,7 +473,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size,
avio_wl64(pb, duration); /* end time stamp (in 100ns units) */
avio_wl64(pb, asf->duration); /* duration (in 100ns units) */
avio_wl64(pb, PREROLL_TIME); /* start time stamp */
- avio_wl32(pb, (asf->is_streamed || !pb->seekable) ? 3 : 2); /* ??? */
+ avio_wl32(pb, (asf->is_streamed || !(pb->seekable & AVIO_SEEKABLE_NORMAL)) ? 3 : 2); /* ??? */
avio_wl32(pb, s->packet_size); /* packet size */
avio_wl32(pb, s->packet_size); /* packet size */
avio_wl32(pb, bit_rate ? bit_rate : -1); /* Maximum data rate in bps */
@@ -530,7 +530,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size,
avio_wl32(pb, 5000); /* maximum buffer size ms */
avio_wl32(pb, 0); /* max initial buffer fullness */
avio_wl32(pb, 0); /* max object size */
- avio_wl32(pb, (!asf->is_streamed && pb->seekable) << 1); /* flags - seekable */
+ avio_wl32(pb, (!asf->is_streamed && (pb->seekable & AVIO_SEEKABLE_NORMAL)) << 1); /* flags - seekable */
avio_wl16(pb, n + 1); /* stream number */
avio_wl16(pb, asf->streams[n].stream_language_index); /* language id index */
avio_wl64(pb, 0); /* avg time per frame */
@@ -1135,7 +1135,7 @@ static int asf_write_trailer(AVFormatContext *s)
}
avio_flush(s->pb);
- if (asf->is_streamed || !s->pb->seekable) {
+ if (asf->is_streamed || !(s->pb->seekable & AVIO_SEEKABLE_NORMAL)) {
put_chunk(s, 0x4524, 0, 0); /* end of stream */
} else {
/* rewrite an updated header */