Commit e1cf1a9c authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'a0b7e289'

* commit 'a0b7e289':
  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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents d0b45045 a0b7e289
......@@ -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) \
{ \
......
......@@ -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)
......
......@@ -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) \
{ \
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment