summaryrefslogtreecommitdiff
path: root/libavformat/avienc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-04-04 02:15:12 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-04-04 02:15:12 +0200
commit2cae9809e2d59c7336fc2cccb97b82c7f764868a (patch)
tree823d962b7237e515e14e2679084e5981d5b808a5 /libavformat/avienc.c
parent3c9bfb336867ccd32a6e8490930961bcc14b3fdc (diff)
parent906fd03070c7dc39b4c937befa2c3559bccf7ba7 (diff)
Merge remote branch 'qatar/master'
* qatar/master: fate: fix partial run when no samples path is specified ARM: NEON fixed-point forward MDCT ARM: NEON fixed-point FFT lavf: bump minor version and add an APIChanges entry for avio changes avio: simplify url_open_dyn_buf_internal by using avio_alloc_context() avio: make url_fdopen internal. avio: make url_open_dyn_packet_buf internal. avio: avio_ prefix for url_close_dyn_buf avio: avio_ prefix for url_open_dyn_buf avio: introduce an AVIOContext.seekable field ac3enc: use generic fixed-point mdct lavfi: add fade filter Change yadif to not use out of picture lines. lavc: deprecate AVCodecContext.antialias_algo lavc: mark mb_qmin/mb_qmax for removal on next major bump. Conflicts: doc/filters.texi libavcodec/ac3enc_fixed.h libavcodec/ac3enc_float.h libavfilter/Makefile libavfilter/allfilters.c libavfilter/vf_fade.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/avienc.c')
-rw-r--r--libavformat/avienc.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libavformat/avienc.c b/libavformat/avienc.c
index 3743abb8d7..ff74c3b492 100644
--- a/libavformat/avienc.c
+++ b/libavformat/avienc.c
@@ -197,7 +197,7 @@ static int avi_write_header(AVFormatContext *s)
}
avio_wl32(pb, bitrate / 8); /* XXX: not quite exact */
avio_wl32(pb, 0); /* padding */
- if (url_is_streamed(pb))
+ if (!pb->seekable)
avio_wl32(pb, AVIF_TRUSTCKTYPE | AVIF_ISINTERLEAVED); /* flags */
else
avio_wl32(pb, AVIF_TRUSTCKTYPE | AVIF_HASINDEX | AVIF_ISINTERLEAVED); /* flags */
@@ -259,7 +259,7 @@ static int avi_write_header(AVFormatContext *s)
avio_wl32(pb, 0); /* start */
avist->frames_hdr_strm = avio_tell(pb); /* remember this offset to fill later */
- if (url_is_streamed(pb))
+ if (!pb->seekable)
avio_wl32(pb, AVI_MAX_RIFF_SIZE); /* FIXME: this may be broken, but who cares */
else
avio_wl32(pb, 0); /* length, XXX: filled later */
@@ -303,7 +303,7 @@ static int avi_write_header(AVFormatContext *s)
}
}
- if (!url_is_streamed(pb)) {
+ if (pb->seekable) {
unsigned char tag[5];
int j;
@@ -362,7 +362,7 @@ static int avi_write_header(AVFormatContext *s)
ff_end_tag(pb, list2);
}
- if (!url_is_streamed(pb)) {
+ if (pb->seekable) {
/* AVI could become an OpenDML one, if it grows beyond 2Gb range */
avi->odml_list = ff_start_tag(pb, "JUNK");
ffio_wfourcc(pb, "odml");
@@ -406,7 +406,7 @@ static int avi_write_ix(AVFormatContext *s)
char ix_tag[] = "ix00";
int i, j;
- assert(!url_is_streamed(pb));
+ assert(pb->seekable);
if (avi->riff_id > AVI_MASTER_INDEX_SIZE)
return -1;
@@ -464,7 +464,7 @@ static int avi_write_idx1(AVFormatContext *s)
int i;
char tag[5];
- if (!url_is_streamed(pb)) {
+ if (pb->seekable) {
AVIStream *avist;
AVIIentry* ie = 0, *tie;
int empty, stream_id = -1;
@@ -532,7 +532,7 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt)
avist->packet_count++;
// Make sure to put an OpenDML chunk when the file size exceeds the limits
- if (!url_is_streamed(pb) &&
+ if (pb->seekable &&
(avio_tell(pb) - avi->riff_start > AVI_MAX_RIFF_SIZE)) {
avi_write_ix(s);
@@ -552,7 +552,7 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt)
avist->audio_strm_length += size;
}
- if (!url_is_streamed(s->pb)) {
+ if (s->pb->seekable) {
AVIIndex* idx = &avist->indexes;
int cl = idx->entry / AVI_INDEX_CLUSTER_SIZE;
int id = idx->entry % AVI_INDEX_CLUSTER_SIZE;
@@ -590,7 +590,7 @@ static int avi_write_trailer(AVFormatContext *s)
int i, j, n, nb_frames;
int64_t file_size;
- if (!url_is_streamed(pb)){
+ if (pb->seekable){
if (avi->riff_id == 1) {
ff_end_tag(pb, avi->movi_list);
res = avi_write_idx1(s);