mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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>
This commit is contained in:
commit
e1cf1a9c89
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user