aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/asfenc.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-09-27 16:26:37 +0200
committerAnton Khirnov <anton@khirnov.net>2016-09-30 16:54:33 +0200
commit83548fe894cdb455cc127f754d09905b6d23c173 (patch)
tree87d466a0d6b205a99ee046e44ab155a8e082f28c /libavformat/asfenc.c
parent8d1267932ca9c2e343ef303349101bab6681d02e (diff)
downloadffmpeg-83548fe894cdb455cc127f754d09905b6d23c173.tar.gz
lavf: fix usage of AVIOContext.seekable
It is supposed to be a flag. The only currently defined value is AVIO_SEEKABLE_NORMAL, but other ones may be added in the future. However all the current lavf code treats this field as a bool (mainly for historical reasons). Change all those cases to properly check for AVIO_SEEKABLE_NORMAL.
Diffstat (limited to 'libavformat/asfenc.c')
-rw-r--r--libavformat/asfenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c
index dc1dd73364..a40c02d00d 100644
--- a/libavformat/asfenc.c
+++ b/libavformat/asfenc.c
@@ -433,7 +433,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size,
avio_wl64(pb, play_duration); /* end time stamp (in 100ns units) */
avio_wl64(pb, send_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); /* Nominal data rate in bps */
@@ -954,7 +954,7 @@ static int asf_write_trailer(AVFormatContext *s)
asf_write_index(s, asf->index_ptr, asf->maximum_packet, asf->nb_index_count);
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 */