diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-04 13:01:54 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-04 13:01:54 +0100 |
commit | e1cf1a9c89dbb3b867c50421cf543221a4d223f9 (patch) | |
tree | acbed33573df63b7d86f785bb44d875326f59420 | |
parent | d0b450457b3aeb8c234b0b0a987db55d3485326b (diff) | |
parent | a0b7e289075dccf223b7f407790d8a86fc5d77e8 (diff) | |
download | ffmpeg-e1cf1a9c89dbb3b867c50421cf543221a4d223f9.tar.gz |
Merge commit 'a0b7e289075dccf223b7f407790d8a86fc5d77e8'
* commit 'a0b7e289075dccf223b7f407790d8a86fc5d77e8':
aviobuf: Partial support for reading in read/write contexts
build: Avoid detecting bogus components named 'x'
Conflicts:
libavcodec/allcodecs.c
libavdevice/alldevices.c
libavformat/allformats.c
libavformat/aviobuf.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/allcodecs.c | 3 | ||||
-rw-r--r-- | libavdevice/alldevices.c | 1 | ||||
-rw-r--r-- | libavformat/allformats.c | 3 | ||||
-rw-r--r-- | libavformat/aviobuf.c | 9 |
4 files changed, 10 insertions, 6 deletions
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 987b87723c..5bf6e88237 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -48,8 +48,7 @@ avcodec_register(&ff_##x##_decoder); \ } -/* Warning: do not split this line, it will break configure script */ -#define REGISTER_ENCDEC(X, x) REGISTER_ENCODER(X, x); REGISTER_DECODER(X,x) +#define REGISTER_ENCDEC(X, x) REGISTER_ENCODER(X, x); REGISTER_DECODER(X, x) #define REGISTER_PARSER(X, x) \ { \ diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c index d1a5fd81c4..daa66382b1 100644 --- a/libavdevice/alldevices.c +++ b/libavdevice/alldevices.c @@ -35,7 +35,6 @@ av_register_input_format(&ff_##x##_demuxer); \ } -/* Warning: do not split this line, it will break configure script */ #define REGISTER_INOUTDEV(X, x) REGISTER_OUTDEV(X, x); REGISTER_INDEV(X, x) void avdevice_register_all(void) diff --git a/libavformat/allformats.c b/libavformat/allformats.c index 3946609bb9..c3aa187f5b 100644 --- a/libavformat/allformats.c +++ b/libavformat/allformats.c @@ -39,8 +39,7 @@ av_register_input_format(&ff_##x##_demuxer); \ } -/* Warning: do not split this line, it will break configure script */ -#define REGISTER_MUXDEMUX(X, x) REGISTER_MUXER(X, x); REGISTER_DEMUXER(X,x) +#define REGISTER_MUXDEMUX(X, x) REGISTER_MUXER(X, x); REGISTER_DEMUXER(X, x) #define REGISTER_PROTOCOL(X, x) \ { \ diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 6733b59dab..95a41bbbc6 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -483,7 +483,7 @@ int avio_read(AVIOContext *s, unsigned char *buf, int size) len = s->buf_end - s->buf_ptr; if (len > size) len = size; - if (len == 0) { + if (len == 0 || s->write_flag) { if((s->direct || size > s->buffer_size) && !s->update_checksum){ if(s->read_packet) len = s->read_packet(s->opaque, buf, size); @@ -529,6 +529,13 @@ int ffio_read_partial(AVIOContext *s, unsigned char *buf, int size) if (size < 0) return -1; + if (s->read_packet && s->write_flag) { + len = s->read_packet(s->opaque, buf, size); + if (len > 0) + s->pos += len; + return len; + } + len = s->buf_end - s->buf_ptr; if (len == 0) { fill_buffer(s); |