diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-06-27 01:58:09 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-06-27 01:58:09 +0200 |
commit | b536e2facfa0872adeb6aaae4189f9b90d907e36 (patch) | |
tree | 3649d9dd83aa7e0ed617ce3de4a1b7020ef89251 /libavformat | |
parent | 5916bc46581230c68c946c0b4733cce381eddcbd (diff) | |
parent | c29c1a1b6bade2b9118c7fa01239c622c2238656 (diff) | |
download | ffmpeg-b536e2facfa0872adeb6aaae4189f9b90d907e36.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
avconv: add an assert to silence an uninitialized variable warning.
avconv: shut up an uninitialized variable warning.
avfiltergraph: shut up uninitialized variable warning.
af_join: initialize a variable to shut up gcc warning.
amix: fix format specifier for AVFilterLink.sample_rate.
lavfi: make filters less verbose.
mpc8: read APE tags.
lavr: x86: fix ff_conv_fltp_to_flt_6ch function prototypes
libm: provide fallback definition for cbrtf() using powf()
network: Don't redefine error codes if they already exist in errno.h
configure: Check for sys/time.h
network: Include unistd.h from network.h
avconv: don't include vsrc_buffer.h, which doesn't exist anymore
lavfi: reorder AVFilterLink fields.
lavfi: reorder AVFilterContext fields.
lavfi: reorder AVFilter fields.
lavfi: reorder AVFilterBufferRef fields.
lavfi: reorder AVFilterBuffer fields.
Conflicts:
configure
libavcodec/v210dec.h
libavfilter/asrc_anullsrc.c
libavfilter/avfilter.h
libavfilter/buffersrc.c
libavfilter/src_movie.c
libavfilter/vf_aspect.c
libavfilter/vf_crop.c
libavfilter/vf_drawbox.c
libavfilter/vf_fade.c
libavfilter/vf_overlay.c
libavfilter/vf_pad.c
libavfilter/vf_scale.c
libavfilter/vsrc_color.c
libavformat/network.h
libavutil/libm.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/Makefile | 2 | ||||
-rw-r--r-- | libavformat/mpc8.c | 7 | ||||
-rw-r--r-- | libavformat/network.c | 8 | ||||
-rw-r--r-- | libavformat/network.h | 19 | ||||
-rw-r--r-- | libavformat/os_support.c | 2 | ||||
-rw-r--r-- | libavformat/sctp.c | 1 | ||||
-rw-r--r-- | libavformat/tcp.c | 1 | ||||
-rw-r--r-- | libavformat/udp.c | 1 |
8 files changed, 28 insertions, 13 deletions
diff --git a/libavformat/Makefile b/libavformat/Makefile index 9032654ae5..18be808d6f 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -169,7 +169,7 @@ OBJS-$(CONFIG_MP2_MUXER) += mp3enc.o rawenc.o id3v2enc.o OBJS-$(CONFIG_MP3_DEMUXER) += mp3dec.o OBJS-$(CONFIG_MP3_MUXER) += mp3enc.o rawenc.o id3v2enc.o OBJS-$(CONFIG_MPC_DEMUXER) += mpc.o apetag.o -OBJS-$(CONFIG_MPC8_DEMUXER) += mpc8.o +OBJS-$(CONFIG_MPC8_DEMUXER) += mpc8.o apetag.o OBJS-$(CONFIG_MPEG1SYSTEM_MUXER) += mpegenc.o OBJS-$(CONFIG_MPEG1VCD_MUXER) += mpegenc.o OBJS-$(CONFIG_MPEG2DVD_MUXER) += mpegenc.o diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c index c8eaddc757..026115481d 100644 --- a/libavformat/mpc8.c +++ b/libavformat/mpc8.c @@ -21,6 +21,7 @@ #include "libavcodec/get_bits.h" #include "libavcodec/unary.h" +#include "apetag.h" #include "avformat.h" #include "internal.h" #include "avio_internal.h" @@ -242,6 +243,12 @@ static int mpc8_read_header(AVFormatContext *s) if (size > 0) avio_skip(pb, size); + if (pb->seekable) { + int64_t pos = avio_tell(s->pb); + ff_ape_parse_tag(s); + avio_seek(s->pb, pos, SEEK_SET); + } + return 0; } diff --git a/libavformat/network.c b/libavformat/network.c index 727ca5024f..6b4cb570b3 100644 --- a/libavformat/network.c +++ b/libavformat/network.c @@ -165,6 +165,14 @@ int ff_neterrno(void) return AVERROR(EAGAIN); case WSAEINTR: return AVERROR(EINTR); + case WSAEPROTONOSUPPORT: + return AVERROR(EPROTONOSUPPORT); + case WSAETIMEDOUT: + return AVERROR(ETIMEDOUT); + case WSAECONNREFUSED: + return AVERROR(ECONNREFUSED); + case WSAEINPROGRESS: + return AVERROR(EINPROGRESS); } return -err; } diff --git a/libavformat/network.h b/libavformat/network.h index d890e7c060..33cd517b51 100644 --- a/libavformat/network.h +++ b/libavformat/network.h @@ -27,26 +27,27 @@ #include "libavutil/error.h" #include "os_support.h" +#if HAVE_UNISTD_H +#include <unistd.h> +#endif + #if HAVE_WINSOCK2_H #include <winsock2.h> #include <ws2tcpip.h> -#ifdef EPROTONOSUPPORT -# undef EPROTONOSUPPORT -#endif +#ifndef EPROTONOSUPPORT #define EPROTONOSUPPORT WSAEPROTONOSUPPORT -#ifdef ETIMEDOUT -# undef ETIMEDOUT #endif +#ifndef ETIMEDOUT #define ETIMEDOUT WSAETIMEDOUT -#ifdef ECONNREFUSED -# undef ECONNREFUSED #endif +#ifndef ECONNREFUSED #define ECONNREFUSED WSAECONNREFUSED -#ifdef EINPROGRESS -# undef EINPROGRESS #endif +#ifndef EINPROGRESS #define EINPROGRESS WSAEINPROGRESS +#endif + #define getsockopt(a, b, c, d, e) getsockopt(a, b, c, (char*) d, e) #define setsockopt(a, b, c, d, e) setsockopt(a, b, c, (const char*) d, e) diff --git a/libavformat/os_support.c b/libavformat/os_support.c index e18704428b..fd3836d574 100644 --- a/libavformat/os_support.c +++ b/libavformat/os_support.c @@ -59,7 +59,9 @@ int ff_win32_open(const char *filename_utf8, int oflag, int pmode) #if CONFIG_NETWORK #include <fcntl.h> #if !HAVE_POLL_H +#if HAVE_SYS_TIME_H #include <sys/time.h> +#endif #if HAVE_WINSOCK2_H #include <winsock2.h> #elif HAVE_SYS_SELECT_H diff --git a/libavformat/sctp.c b/libavformat/sctp.c index 07de4986d2..7bcb5ae0a9 100644 --- a/libavformat/sctp.c +++ b/libavformat/sctp.c @@ -39,7 +39,6 @@ #include <netinet/in.h> #include <netinet/sctp.h> -#include <unistd.h> #include "config.h" diff --git a/libavformat/tcp.c b/libavformat/tcp.c index c42c1edbf3..2fb6a8a584 100644 --- a/libavformat/tcp.c +++ b/libavformat/tcp.c @@ -20,7 +20,6 @@ */ #include "avformat.h" #include "libavutil/parseutils.h" -#include <unistd.h> #include "internal.h" #include "network.h" #include "os_support.h" diff --git a/libavformat/udp.c b/libavformat/udp.c index 9ed8f95f73..e8493b5df2 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -32,7 +32,6 @@ #include "libavutil/fifo.h" #include "libavutil/intreadwrite.h" #include "libavutil/avstring.h" -#include <unistd.h> #include "internal.h" #include "network.h" #include "os_support.h" |