offset += avio_tell(pb); /* Compute absolute data offset */
if (st->codecpar->block_align) /* Assume COMM already parsed */
goto got_sound;
- if (!pb->seekable) {
+ if (!(pb->seekable & AVIO_SEEKABLE_NORMAL)) {
av_log(s, AV_LOG_ERROR, "file is not seekable\n");
return -1;
}
end_size++;
}
- if (s->pb->seekable) {
+ if (s->pb->seekable & AVIO_SEEKABLE_NORMAL) {
/* File length */
avio_seek(pb, aiff->form, SEEK_SET);
avio_wb32(pb, file_size - aiff->form - 4);
}
/* try to read APE tags */
- if (pb->seekable) {
+ if (pb->seekable & AVIO_SEEKABLE_NORMAL) {
ff_ape_parse_tag(s);
avio_seek(pb, 0, SEEK_SET);
}
int64_t start, end;
int size, count = 0;
- if (!s->pb->seekable)
+ if (!(s->pb->seekable & AVIO_SEEKABLE_NORMAL))
return 0;
start = avio_tell(s->pb);
size, asf->nb_packets);
avio_skip(pb, 2); // skip reserved field
asf->first_packet_offset = avio_tell(pb);
- if (pb->seekable && !(asf->b_flags & ASF_FLAG_BROADCAST))
+ if ((pb->seekable & AVIO_SEEKABLE_NORMAL) && !(asf->b_flags & ASF_FLAG_BROADCAST))
align_position(pb, asf->offset, asf->data_size);
return 0;
size = avio_rl64(pb);
align_position(pb, asf->offset, size);
}
- if (asf->data_reached && (!pb->seekable || (asf->b_flags & ASF_FLAG_BROADCAST)))
+ if (asf->data_reached &&
+ (!(pb->seekable & AVIO_SEEKABLE_NORMAL) ||
+ (asf->b_flags & ASF_FLAG_BROADCAST)))
break;
}
ret = AVERROR_INVALIDDATA;
goto failed;
}
- if (pb->seekable)
+ if (pb->seekable & AVIO_SEEKABLE_NORMAL)
avio_seek(pb, asf->first_packet_offset, SEEK_SET);
for (i = 0; i < asf->nb_streams; i++) {
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 */
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 */
AVIOContext *pb = s->pb;
int64_t file_size;
- if (s->pb->seekable) {
+ if (s->pb->seekable & AVIO_SEEKABLE_NORMAL) {
/* update file size */
file_size = avio_tell(pb);
avio_seek(pb, 8, SEEK_SET);
break;
case MKTAG('i', 'n', 'd', 'x'):
pos = avio_tell(pb);
- if (pb->seekable && !(s->flags & AVFMT_FLAG_IGNIDX) &&
+ if ((pb->seekable & AVIO_SEEKABLE_NORMAL) &&
+ !(s->flags & AVFMT_FLAG_IGNIDX) &&
read_braindead_odml_indx(s, 0) < 0 &&
(s->error_recognition & AV_EF_EXPLODE))
goto fail;
return AVERROR_INVALIDDATA;
}
- if (!avi->index_loaded && pb->seekable)
+ if (!avi->index_loaded && (pb->seekable & AVIO_SEEKABLE_NORMAL))
avi_load_index(s);
avi->index_loaded = 1;
avio_wl32(pb, 0);
avio_wl32(pb, bitrate / 8); /* XXX: not quite exact */
avio_wl32(pb, 0); /* padding */
- if (!pb->seekable)
+ if (!(pb->seekable & AVIO_SEEKABLE_NORMAL))
avio_wl32(pb, AVIF_TRUSTCKTYPE | AVIF_ISINTERLEAVED); /* flags */
else
avio_wl32(pb, AVIF_TRUSTCKTYPE | AVIF_HASINDEX | AVIF_ISINTERLEAVED); /* flags */
avio_wl32(pb, 0); /* start */
/* remember this offset to fill later */
avist->frames_hdr_strm = avio_tell(pb);
- if (!pb->seekable)
+ if (!(pb->seekable & AVIO_SEEKABLE_NORMAL))
/* FIXME: this may be broken, but who cares */
avio_wl32(pb, AVI_MAX_RIFF_SIZE);
else
}
}
- if (pb->seekable) {
+ if (pb->seekable & AVIO_SEEKABLE_NORMAL) {
unsigned char tag[5];
int j;
ff_end_tag(pb, list2);
}
- if (pb->seekable) {
+ if (pb->seekable & AVIO_SEEKABLE_NORMAL) {
/* AVI could become an OpenDML one, if it grows beyond 2Gb range */
avi->odml_list = ff_start_tag(pb, "JUNK");
ffio_wfourcc(pb, "odml");
char ix_tag[] = "ix00";
int i, j;
- assert(pb->seekable);
+ assert(pb->seekable & AVIO_SEEKABLE_NORMAL);
if (avi->riff_id > AVI_MASTER_INDEX_SIZE)
return -1;
int i;
char tag[5];
- if (pb->seekable) {
+ if (pb->seekable & AVIO_SEEKABLE_NORMAL) {
AVIStream *avist;
AVIIentry *ie = 0, *tie;
int empty, stream_id = -1;
avist->packet_count++;
// Make sure to put an OpenDML chunk when the file size exceeds the limits
- if (pb->seekable &&
+ if ((pb->seekable & AVIO_SEEKABLE_NORMAL) &&
(avio_tell(pb) - avi->riff_start > AVI_MAX_RIFF_SIZE)) {
avi_write_ix(s);
ff_end_tag(pb, avi->movi_list);
if (par->codec_type == AVMEDIA_TYPE_AUDIO)
avist->audio_strm_length += size;
- if (s->pb->seekable) {
+ if (s->pb->seekable & AVIO_SEEKABLE_NORMAL) {
int err;
AVIIndex *idx = &avist->indexes;
int cl = idx->entry / AVI_INDEX_CLUSTER_SIZE;
int i, j, n, nb_frames;
int64_t file_size;
- if (pb->seekable) {
+ if (pb->seekable & AVIO_SEEKABLE_NORMAL) {
if (avi->riff_id == 1) {
ff_end_tag(pb, avi->movi_list);
res = avi_write_idx1(s);
offset1 >= 0 && offset1 < (s->buf_end - s->buffer)) {
/* can do the seek inside the buffer */
s->buf_ptr = s->buffer + offset1;
- } else if ((!s->seekable ||
+ } else if ((!(s->seekable & AVIO_SEEKABLE_NORMAL) ||
offset1 <= s->buf_end + SHORT_SEEK_THRESHOLD - s->buffer) &&
!s->write_flag && offset1 >= 0 &&
(whence != SEEK_END || force)) {
BinkDemuxContext *bink = s->priv_data;
AVStream *vst = s->streams[0];
- if (!s->pb->seekable)
+ if (!(s->pb->seekable & AVIO_SEEKABLE_NORMAL))
return -1;
/* seek to the first frame */
/* stop at data chunk if seeking is not supported or
data chunk size is unknown */
- if (found_data && (caf->data_size < 0 || !pb->seekable))
+ if (found_data && (caf->data_size < 0 || !(pb->seekable & AVIO_SEEKABLE_NORMAL)))
break;
tag = avio_rb32(pb);
avio_skip(pb, 4); /* edit count */
caf->data_start = avio_tell(pb);
caf->data_size = size < 0 ? -1 : size - 4;
- if (caf->data_size > 0 && pb->seekable)
+ if (caf->data_size > 0 && (pb->seekable & AVIO_SEEKABLE_NORMAL))
avio_skip(pb, caf->data_size);
found_data = 1;
break;
AVIOContext *pb = s->pb;
AVStream *st;
- if (!s->pb->seekable)
+ if (!(s->pb->seekable & AVIO_SEEKABLE_NORMAL))
return AVERROR(EIO);
avio_seek(pb, avio_size(pb) - 36, SEEK_SET);
if (!c->write_header || !streaminfo)
return 0;
- if (pb->seekable) {
+ if (pb->seekable & AVIO_SEEKABLE_NORMAL) {
/* rewrite the STREAMINFO header block data */
file_size = avio_tell(pb);
avio_seek(pb, 8, SEEK_SET);
// if not streamed and no duration from metadata then seek to end to find
// the duration from the timestamps
- if (s->pb->seekable && (!s->duration || s->duration == AV_NOPTS_VALUE) &&
+ if ((s->pb->seekable & AVIO_SEEKABLE_NORMAL) &&
+ (!s->duration || s->duration == AV_NOPTS_VALUE) &&
!flv->searched_for_end) {
int size;
const int64_t pos = avio_tell(s->pb);
uint8_t tracks[255] = {0};
int i, media_info = 0;
- if (!pb->seekable) {
+ if (!(pb->seekable & AVIO_SEEKABLE_NORMAL)) {
av_log(s, AV_LOG_ERROR, "gxf muxer does not support streamed output, patch welcome");
return -1;
}
uint8_t buf[ID3v1_TAG_SIZE];
int64_t filesize, position = avio_tell(s->pb);
- if (s->pb->seekable) {
+ if (s->pb->seekable & AVIO_SEEKABLE_NORMAL) {
/* XXX: change that */
filesize = avio_size(s->pb);
if (filesize > 128) {
int i;
// we should not do any seeking in the streaming case
- if (!matroska->ctx->pb->seekable ||
+ if (!(matroska->ctx->pb->seekable & AVIO_SEEKABLE_NORMAL) ||
(matroska->ctx->flags & AVFMT_FLAG_IGNIDX))
return;
return ret;
}
- if (!s->pb->seekable)
+ if (!(s->pb->seekable & AVIO_SEEKABLE_NORMAL))
mkv_write_seekhead(pb, mkv->main_seekhead);
mkv->cues = mkv_start_cues(mkv->segment_offset);
if (!mkv->cues)
return AVERROR(ENOMEM);
- if (pb->seekable && mkv->reserve_cues_space) {
+ if ((pb->seekable & AVIO_SEEKABLE_NORMAL) && mkv->reserve_cues_space) {
mkv->cues_pos = avio_tell(pb);
put_ebml_void(pb, mkv->reserve_cues_space);
}
// start a new cluster every 5 MB or 5 sec, or 32k / 1 sec for streaming or
// after 4k and on a keyframe
- if (pb->seekable) {
+ if (pb->seekable & AVIO_SEEKABLE_NORMAL) {
if (mkv->cluster_time_limit < 0)
mkv->cluster_time_limit = 5000;
if (mkv->cluster_size_limit < 0)
}
ts += mkv->tracks[pkt->stream_index].ts_offset;
- if (!s->pb->seekable) {
+ if (!(s->pb->seekable & AVIO_SEEKABLE_NORMAL)) {
if (!mkv->dyn_bc) {
ret = avio_open_dyn_buf(&mkv->dyn_bc);
if (ret < 0)
// start a new cluster every 5 MB or 5 sec, or 32k / 1 sec for streaming or
// after 4k and on a keyframe
- if (s->pb->seekable) {
+ if (s->pb->seekable & AVIO_SEEKABLE_NORMAL) {
pb = s->pb;
cluster_size = avio_tell(pb) - mkv->cluster_pos;
} else {
{
MatroskaMuxContext *mkv = s->priv_data;
AVIOContext *pb;
- if (s->pb->seekable)
+ if (s->pb->seekable & AVIO_SEEKABLE_NORMAL)
pb = s->pb;
else
pb = mkv->dyn_bc;
return ret;
}
- if (pb->seekable) {
+ if (pb->seekable & AVIO_SEEKABLE_NORMAL) {
if (mkv->cues->num_entries) {
if (mkv->reserve_cues_space) {
int64_t cues_end;
int64_t pos, size;
int gatetime;
- if (s->pb->seekable) {
+ if (s->pb->seekable & AVIO_SEEKABLE_NORMAL) {
/* Fill in length fields */
end_tag_be(pb, mmf->awapos);
end_tag_be(pb, mmf->atrpos);
if (err < 0)
return err;
if (c->found_moov && c->found_mdat &&
- ((!pb->seekable || c->fc->flags & AVFMT_FLAG_IGNIDX) ||
+ ((!(pb->seekable & AVIO_SEEKABLE_NORMAL) || c->fc->flags & AVFMT_FLAG_IGNIDX) ||
start_pos + a.size == avio_size(pb))) {
- if (!pb->seekable || c->fc->flags & AVFMT_FLAG_IGNIDX)
+ if (!(pb->seekable & AVIO_SEEKABLE_NORMAL) || c->fc->flags & AVFMT_FLAG_IGNIDX)
c->next_root_atom = start_pos + a.size;
return 0;
}
mov->fc = s;
/* .mov and .mp4 aren't streamable anyway (only progressive download if moov is before mdat) */
- if (pb->seekable)
+ if (pb->seekable & AVIO_SEEKABLE_NORMAL)
atom.size = avio_size(pb);
else
atom.size = INT64_MAX;
}
av_log(mov->fc, AV_LOG_TRACE, "on_parse_exit_offset=%"PRId64"\n", avio_tell(pb));
- if (pb->seekable && mov->chapter_track > 0)
+ if ((pb->seekable & AVIO_SEEKABLE_NORMAL) && mov->chapter_track > 0)
mov_read_chapters(s);
for (i = 0; i < s->nb_streams; i++) {
AVIndexEntry *current_sample = &avst->index_entries[msc->current_sample];
int64_t dts = av_rescale(current_sample->timestamp, AV_TIME_BASE, msc->time_scale);
av_log(s, AV_LOG_TRACE, "stream %d, sample %d, dts %"PRId64"\n", i, msc->current_sample, dts);
- if (!sample || (!s->pb->seekable && current_sample->pos < sample->pos) ||
- (s->pb->seekable &&
+ if (!sample || (!(s->pb->seekable & AVIO_SEEKABLE_NORMAL) && current_sample->pos < sample->pos) ||
+ ((s->pb->seekable & AVIO_SEEKABLE_NORMAL) &&
((msc->pb != s->pb && dts < best_dts) || (msc->pb == s->pb &&
((FFABS(best_dts - dts) <= AV_TIME_BASE && current_sample->pos < sample->pos) ||
(FFABS(best_dts - dts) > AV_TIME_BASE && dts < best_dts)))))) {
/* Non-seekable output is ok if using fragmentation. If ism_lookahead
* is enabled, we don't support non-seekable output at all. */
- if (!s->pb->seekable &&
+ if (!(s->pb->seekable & AVIO_SEEKABLE_NORMAL) &&
(!(mov->flags & FF_MOV_FLAG_FRAGMENT) || mov->ism_lookahead)) {
av_log(s, AV_LOG_ERROR, "muxer does not support non seekable output\n");
return AVERROR(EINVAL);
int ver = 0;
int lsf, bytes_needed;
- if (!s->pb->seekable || !mp3->write_xing)
+ if (!(s->pb->seekable & AVIO_SEEKABLE_NORMAL) || !mp3->write_xing)
return;
for (i = 0; i < FF_ARRAY_ELEMS(avpriv_mpa_freq_tab); i++) {
st->duration = c->fcount;
/* try to read APE tags */
- if (s->pb->seekable) {
+ if (s->pb->seekable & AVIO_SEEKABLE_NORMAL) {
int64_t pos = avio_tell(s->pb);
ff_ape_parse_tag(s);
if (!av_dict_get(s->metadata, "", NULL, AV_DICT_IGNORE_SUFFIX))
st->duration = c->samples / (1152 << (st->codecpar->extradata[1]&3)*2);
size -= avio_tell(pb) - pos;
- if (pb->seekable) {
+ if (pb->seekable & AVIO_SEEKABLE_NORMAL) {
int64_t pos = avio_tell(s->pb);
c->apetag_start = ff_ape_parse_tag(s);
avio_seek(s->pb, pos, SEEK_SET);
int i;
for (i = 0; i < s->nb_streams; i++) {
if (startcode == s->streams[i]->id &&
- s->pb->seekable /* index useless on streams anyway */) {
+ (s->pb->seekable & AVIO_SEEKABLE_NORMAL) /* index useless on streams anyway */) {
ff_reduce_index(s, i);
av_add_index_entry(s->streams[i], *ppos, dts, 0, 0,
AVINDEX_KEYFRAME /* FIXME keyframe? */);
/* normal demux */
/* first do a scan to get all the services */
- if (avio_seek(pb, pos, SEEK_SET) < 0 && pb->seekable)
+ if (avio_seek(pb, pos, SEEK_SET) < 0 &&
+ (pb->seekable & AVIO_SEEKABLE_NORMAL))
av_log(s, AV_LOG_ERROR, "Unable to seek back to the start\n");
mpegts_open_section_filter(ts, SDT_PID, sdt_cb, ts, 1);
if (index->pos > pos)
avio_skip(pb, index->pos - pos);
else if (index->pos < pos) {
- if (!pb->seekable)
+ if (!(pb->seekable & AVIO_SEEKABLE_NORMAL))
return AVERROR(EIO);
ret = avio_seek(pb, index->pos, SEEK_SET);
if (ret < 0)
if ((flags & AVSEEK_FLAG_FRAME) || (flags & AVSEEK_FLAG_BYTE))
return AVERROR(ENOSYS);
- if (!avctx->pb->seekable)
+ if (!(avctx->pb->seekable & AVIO_SEEKABLE_NORMAL))
return AVERROR(EIO);
frame = av_index_search_timestamp(st, timestamp, flags);
/* remember where we were so we don't end up seeking further back than this */
mxf->last_forward_tell = avio_tell(pb);
- if (!pb->seekable) {
+ if (!(pb->seekable & AVIO_SEEKABLE_NORMAL)) {
av_log(mxf->fc, AV_LOG_INFO, "file is not seekable - not parsing last partition\n");
return -1;
}
int64_t file_size;
KLVPacket klv;
- if (!s->pb->seekable)
+ if (!(s->pb->seekable & AVIO_SEEKABLE_NORMAL))
return;
file_size = avio_size(s->pb);
mxf_write_klv_fill(s);
mxf_write_random_index_pack(s);
- if (s->pb->seekable) {
+ if (s->pb->seekable & AVIO_SEEKABLE_NORMAL) {
avio_seek(pb, 0, SEEK_SET);
if (mxf->edit_unit_byte_count) {
if ((err = mxf_write_partition(s, 1, 2, header_closed_partition_key, 1)) < 0)
s->internal->data_offset = pos - 8;
- if (bc->seekable) {
+ if (bc->seekable & AVIO_SEEKABLE_NORMAL) {
int64_t orig_pos = avio_tell(bc);
find_and_decode_index(nut);
avio_seek(bc, orig_pos, SEEK_SET);
int i, ret;
int64_t size, end;
- if (!s->pb->seekable)
+ if (!(s->pb->seekable & AVIO_SEEKABLE_NORMAL))
return 0;
// already set
s->internal->data_offset = avio_tell(s->pb);
av_log(s, AV_LOG_TRACE, "data offset %#"PRIx64"\n", s->internal->data_offset);
- if (!s->pb->seekable)
+ if (!(s->pb->seekable & AVIO_SEEKABLE_NORMAL))
return 0;
// find REOB/REOF/REOS to load index
avio_seek(s->pb, avio_size(s->pb)-48-8, SEEK_SET);
if (!data_off)
data_off = avio_tell(pb) - 18;
- if (indx_off && pb->seekable && !(s->flags & AVFMT_FLAG_IGNIDX) &&
+ if (indx_off && (pb->seekable & AVIO_SEEKABLE_NORMAL) &&
+ !(s->flags & AVFMT_FLAG_IGNIDX) &&
avio_seek(pb, indx_off, SEEK_SET) >= 0) {
rm_read_index(s);
avio_seek(pb, data_off + 18, SEEK_SET);
avio_wb32(s, 0); /* data offset : will be patched after */
avio_wb16(s, ctx->nb_streams); /* num streams */
flags = 1 | 2; /* save allowed & perfect play */
- if (!s->seekable)
+ if (!(s->seekable & AVIO_SEEKABLE_NORMAL))
flags |= 4; /* live broadcast */
avio_wb16(s, flags);
avio_wb32(s, 0); /* start time */
avio_wb32(s, BUFFER_DURATION); /* preroll */
/* duration */
- if (!s->seekable || !stream->total_frames)
+ if (!(s->seekable & AVIO_SEEKABLE_NORMAL) || !stream->total_frames)
avio_wb32(s, (int)(3600 * 1000));
else
avio_wb32(s, (int)(stream->total_frames * 1000 / stream->frame_rate));
int data_size, index_pos, i;
AVIOContext *pb = s->pb;
- if (s->pb->seekable) {
+ if (s->pb->seekable & AVIO_SEEKABLE_NORMAL) {
/* end of file: finish to write header */
index_pos = avio_tell(pb);
data_size = index_pos - rm->data_pos;
return AVERROR_INVALIDDATA;
}
- if (!s->pb->seekable) {
+ if (!(s->pb->seekable & AVIO_SEEKABLE_NORMAL)) {
av_log(s, AV_LOG_ERROR, "muxer does not support non seekable output\n");
return AVERROR_INVALIDDATA;
}
AVIOContext *pb = s->pb;
int64_t currentpos;
- if (pb->seekable) {
+ if (pb->seekable & AVIO_SEEKABLE_NORMAL) {
currentpos = avio_tell(pb);
avio_seek(pb, 12, SEEK_SET);
avio_wb32(pb, smc->duration);
AVIOContext *pb = s->pb;
AVCodecParameters *par = s->streams[0]->codecpar;
- if (s->pb->seekable) {
+ if (s->pb->seekable & AVIO_SEEKABLE_NORMAL) {
/* update number of samples */
int64_t file_size = avio_tell(pb);
int64_t num_samples = (file_size - sox->header_size - 4LL) >> 2LL;
put_swf_end_tag(s);
/* patch file size and number of frames if not streamed */
- if (s->pb->seekable && video_par) {
+ if ((s->pb->seekable & AVIO_SEEKABLE_NORMAL) && video_par) {
file_size = avio_tell(pb);
avio_seek(pb, 4, SEEK_SET);
avio_wl32(pb, file_size);
case TAK_METADATA_END: {
int64_t curpos = avio_tell(pb);
- if (pb->seekable) {
+ if (pb->seekable & AVIO_SEEKABLE_NORMAL) {
ff_ape_parse_tag(s);
avio_seek(pb, curpos, SEEK_SET);
}
/* simulate tty display speed */
s->chars_per_frame = FFMAX(av_q2d(st->time_base)*s->chars_per_frame, 1);
- if (avctx->pb->seekable) {
+ if (avctx->pb->seekable & AVIO_SEEKABLE_NORMAL) {
s->fsize = avio_size(avctx->pb);
st->duration = (s->fsize + s->chars_per_frame - 1) / s->chars_per_frame;
if ((!strcmp(ic->iformat->name, "mpeg") ||
!strcmp(ic->iformat->name, "mpegts")) &&
- file_size && ic->pb->seekable) {
+ file_size && (ic->pb->seekable & AVIO_SEEKABLE_NORMAL)) {
/* get accurate estimate from the PTSes */
estimate_timings_from_pts(ic, old_offset);
} else if (has_duration(ic)) {
RCVContext *ctx = s->priv_data;
AVIOContext *pb = s->pb;
- if (s->pb->seekable) {
+ if (s->pb->seekable & AVIO_SEEKABLE_NORMAL) {
avio_seek(pb, 0, SEEK_SET);
avio_wl24(pb, ctx->frames);
avio_flush(pb);
return AVERROR(EIO);
voc->remaining_size = avio_rl24(pb);
if (!voc->remaining_size) {
- if (!s->pb->seekable)
+ if (!(s->pb->seekable & AVIO_SEEKABLE_NORMAL))
return AVERROR(EIO);
voc->remaining_size = avio_size(pb) - avio_tell(pb);
}
/* don't look for footer metadata if we can't seek or if we don't
* know where the data tag ends
*/
- if (!pb->seekable || (!rf64 && !size))
+ if (!(pb->seekable & AVIO_SEEKABLE_NORMAL) || (!rf64 && !size))
goto break_loop;
break;
case MKTAG('f', 'a', 'c', 't'):
ff_end_tag(pb, fmt);
if (s->streams[0]->codecpar->codec_tag != 0x01 /* hence for all other than PCM */
- && s->pb->seekable) {
+ && (s->pb->seekable & AVIO_SEEKABLE_NORMAL)) {
wav->fact_pos = ff_start_tag(pb, "fact");
avio_wl32(pb, 0);
ff_end_tag(pb, wav->fact_pos);
avio_flush(pb);
- if (s->pb->seekable) {
+ if (s->pb->seekable & AVIO_SEEKABLE_NORMAL) {
ff_end_tag(pb, wav->data);
/* update file size */
}
if ((rate == -1 || !chan) && !wc->block_parsed) {
int64_t block_end = avio_tell(pb) + wc->header.blocksize;
- if (!pb->seekable) {
+ if (!(pb->seekable & AVIO_SEEKABLE_NORMAL)) {
av_log(ctx, AV_LOG_ERROR,
"Cannot determine additional parameters\n");
return AVERROR_INVALIDDATA;
st->start_time = 0;
st->duration = wc->header.total_samples;
- if (s->pb->seekable) {
+ if (s->pb->seekable & AVIO_SEEKABLE_NORMAL) {
int64_t cur = avio_tell(s->pb);
wc->apetag_start = ff_ape_parse_tag(s);
if (!av_dict_get(s->metadata, "", NULL, AV_DICT_IGNORE_SUFFIX))
WvMuxContext *s = ctx->priv_data;
/* update total number of samples in the first block */
- if (ctx->pb->seekable && s->samples &&
+ if ((ctx->pb->seekable & AVIO_SEEKABLE_NORMAL) && s->samples &&
s->samples < UINT32_MAX) {
int64_t pos = avio_tell(ctx->pb);
avio_seek(ctx->pb, 12, SEEK_SET);