diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-09-07 13:37:19 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-09-07 13:50:24 +0200 |
commit | fa8511851090537f6898fc50d7e6cf56841cf6ab (patch) | |
tree | cc6e217fd99f5080a4726e1c74a6840962e1ff80 /libavformat | |
parent | a7fbc7d7b7eabc74ceb1970a995c56043315e433 (diff) | |
parent | 9afb7061f938831248942050cfdb449e014ed427 (diff) | |
download | ffmpeg-fa8511851090537f6898fc50d7e6cf56841cf6ab.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
mov_chan: Pass a separate AVIOContext for reading
af_asyncts: check return value from lavr when flushing.
mss2: simplify loop in decode_rle()
mss12: avoid unnecessary division in arith*_get_bit()
mss2: do not try to read too many palette entries
mpegvideo: set AVFrame fields to NULL after freeing the base memory
configure: Set the right cc_e flags for msvc
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/aiffdec.c | 2 | ||||
-rw-r--r-- | libavformat/cafdec.c | 2 | ||||
-rw-r--r-- | libavformat/isom.h | 2 | ||||
-rw-r--r-- | libavformat/mov.c | 4 | ||||
-rw-r--r-- | libavformat/mov_chan.c | 4 | ||||
-rw-r--r-- | libavformat/mov_chan.h | 4 |
6 files changed, 10 insertions, 8 deletions
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c index a4606a6336..41fe0d2994 100644 --- a/libavformat/aiffdec.c +++ b/libavformat/aiffdec.c @@ -278,7 +278,7 @@ static int aiff_read_header(AVFormatContext *s) st->codec->block_align = AV_RB32(st->codec->extradata+11*4); break; case MKTAG('C','H','A','N'): - if(ff_mov_read_chan(s, st, size) < 0) + if(ff_mov_read_chan(s, pb, st, size) < 0) return AVERROR_INVALIDDATA; break; default: /* Jump */ diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c index f1682b0d34..a576dac07e 100644 --- a/libavformat/cafdec.c +++ b/libavformat/cafdec.c @@ -268,7 +268,7 @@ static int read_header(AVFormatContext *s) break; case MKBETAG('c','h','a','n'): - if ((ret = ff_mov_read_chan(s, st, size)) < 0) + if ((ret = ff_mov_read_chan(s, s->pb, st, size)) < 0) return ret; break; diff --git a/libavformat/isom.h b/libavformat/isom.h index f7d25375a1..6565bdcc17 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -197,7 +197,7 @@ int ff_mov_read_esds(AVFormatContext *fc, AVIOContext *pb, MOVAtom atom); enum AVCodecID ff_mov_get_lpcm_codec_id(int bps, int flags); int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries); -int ff_mov_read_chan(AVFormatContext *s, AVStream *st, int64_t size); +int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb, AVStream *st, int64_t size); void ff_mov_write_chan(AVIOContext *pb, int64_t channel_layout); #endif /* AVFORMAT_ISOM_H */ diff --git a/libavformat/mov.c b/libavformat/mov.c index 4108b870f6..078bd3f8ea 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -676,7 +676,7 @@ static int mov_read_chan(MOVContext *c, AVIOContext *pb, MOVAtom atom) if (atom.size < 16) return 0; - ff_mov_read_chan(c->fc, st, atom.size - 4); + ff_mov_read_chan(c->fc, pb, st, atom.size - 4); return 0; } @@ -2575,7 +2575,7 @@ static int mov_read_chan2(MOVContext *c, AVIOContext *pb, MOVAtom atom) if (atom.size < 16) return 0; avio_skip(pb, 4); - ff_mov_read_chan(c->fc,c->fc->streams[0], atom.size - 4); + ff_mov_read_chan(c->fc, pb, c->fc->streams[0], atom.size - 4); return 0; } diff --git a/libavformat/mov_chan.c b/libavformat/mov_chan.c index 475a66ba82..074a32019a 100644 --- a/libavformat/mov_chan.c +++ b/libavformat/mov_chan.c @@ -543,9 +543,9 @@ uint32_t ff_mov_get_channel_layout_tag(enum AVCodecID codec_id, return tag; } -int ff_mov_read_chan(AVFormatContext *s, AVStream *st, int64_t size) +int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb, AVStream *st, + int64_t size) { - AVIOContext *pb = s->pb; uint32_t layout_tag, bitmap, num_descr, label_mask; int i; diff --git a/libavformat/mov_chan.h b/libavformat/mov_chan.h index 3972aa6178..3fae93961e 100644 --- a/libavformat/mov_chan.h +++ b/libavformat/mov_chan.h @@ -57,10 +57,12 @@ uint32_t ff_mov_get_channel_layout_tag(enum AVCodecID codec_id, * Read 'chan' tag from the input stream. * * @param s AVFormatContext + * @param pb AVIOContext * @param st The stream to set codec values for * @param size Remaining size in the 'chan' tag * @return 0 if ok, or negative AVERROR code on failure */ -int ff_mov_read_chan(AVFormatContext *s, AVStream *st, int64_t size); +int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb, AVStream *st, + int64_t size); #endif /* AVFORMAT_MOV_CHAN_H */ |