From cb81e29138c17b054d013022cfe81f788598ac7d Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 21 Jun 2012 11:48:58 +0200 Subject: [PATCH 01/18] lavfi: reorder AVFilterBuffer fields. Place related fields together, remove holes. --- libavfilter/avfilter.h | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index d119c1a0a2..29c08fe88b 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -61,22 +61,6 @@ typedef struct AVFilterFormats AVFilterFormats; */ typedef struct AVFilterBuffer { uint8_t *data[8]; ///< buffer data for each plane/channel - int linesize[8]; ///< number of bytes per line - - unsigned refcount; ///< number of references to this buffer - - /** private data to be used by a custom free function */ - void *priv; - /** - * A pointer to the function to deallocate this buffer if the default - * function is not sufficient. This could, for example, add the memory - * back into a memory pool to be reused later without the overhead of - * reallocating it from scratch. - */ - void (*free)(struct AVFilterBuffer *buf); - - int format; ///< media format - int w, h; ///< width and height of the allocated buffer /** * pointers to the data planes/channels. @@ -93,6 +77,21 @@ typedef struct AVFilterBuffer { * in order to access all channels. */ uint8_t **extended_data; + int linesize[8]; ///< number of bytes per line + + /** private data to be used by a custom free function */ + void *priv; + /** + * A pointer to the function to deallocate this buffer if the default + * function is not sufficient. This could, for example, add the memory + * back into a memory pool to be reused later without the overhead of + * reallocating it from scratch. + */ + void (*free)(struct AVFilterBuffer *buf); + + int format; ///< media format + int w, h; ///< width and height of the allocated buffer + unsigned refcount; ///< number of references to this buffer } AVFilterBuffer; #define AV_PERM_READ 0x01 ///< can read from the buffer From f14e685609f033c307aaa3fc02636e0f07a9a245 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 21 Jun 2012 11:48:58 +0200 Subject: [PATCH 02/18] lavfi: reorder AVFilterBufferRef fields. Place related fields together, remove holes. --- libavfilter/avfilter.h | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 29c08fe88b..9932b128a8 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -139,23 +139,6 @@ typedef struct AVFilterBufferRefVideoProps { typedef struct AVFilterBufferRef { AVFilterBuffer *buf; ///< the buffer that this is a reference to uint8_t *data[8]; ///< picture/audio data for each plane - int linesize[8]; ///< number of bytes per line - int format; ///< media format - - /** - * presentation timestamp. The time unit may change during - * filtering, as it is specified in the link and the filter code - * may need to rescale the PTS accordingly. - */ - int64_t pts; - int64_t pos; ///< byte position in stream, -1 if unknown - - int perms; ///< permissions, see the AV_PERM_* flags - - enum AVMediaType type; ///< media type of buffer data - AVFilterBufferRefVideoProps *video; ///< video buffer specific properties - AVFilterBufferRefAudioProps *audio; ///< audio buffer specific properties - /** * pointers to the data planes/channels. * @@ -171,6 +154,24 @@ typedef struct AVFilterBufferRef { * in order to access all channels. */ uint8_t **extended_data; + int linesize[8]; ///< number of bytes per line + + AVFilterBufferRefVideoProps *video; ///< video buffer specific properties + AVFilterBufferRefAudioProps *audio; ///< audio buffer specific properties + + /** + * presentation timestamp. The time unit may change during + * filtering, as it is specified in the link and the filter code + * may need to rescale the PTS accordingly. + */ + int64_t pts; + int64_t pos; ///< byte position in stream, -1 if unknown + + int format; ///< media format + + int perms; ///< permissions, see the AV_PERM_* flags + + enum AVMediaType type; ///< media type of buffer data } AVFilterBufferRef; /** From 961808051222ddb319ce38c0d32caea503cf258c Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 21 Jun 2012 11:48:58 +0200 Subject: [PATCH 03/18] lavfi: reorder AVFilter fields. Place related fields together, remove holes, move private fields to the end and mark them as private. --- libavfilter/avfilter.h | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 9932b128a8..bbbc53ed0f 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -366,7 +366,22 @@ enum AVMediaType avfilter_pad_get_type(AVFilterPad *pads, int pad_idx); typedef struct AVFilter { const char *name; ///< filter name - int priv_size; ///< size of private data to allocate for the filter + /** + * A description for the filter. You should use the + * NULL_IF_CONFIG_SMALL() macro to define it. + */ + const char *description; + + const AVFilterPad *inputs; ///< NULL terminated list of inputs. NULL if none + const AVFilterPad *outputs; ///< NULL terminated list of outputs. NULL if none + + /***************************************************************** + * All fields below this line are not part of the public API. They + * may not be used outside of libavfilter and can be changed and + * removed at will. + * New public fields should be added right above. + ***************************************************************** + */ /** * Filter initialization function. Args contains the user-supplied @@ -391,14 +406,7 @@ typedef struct AVFilter { */ int (*query_formats)(AVFilterContext *); - const AVFilterPad *inputs; ///< NULL terminated list of inputs. NULL if none - const AVFilterPad *outputs; ///< NULL terminated list of outputs. NULL if none - - /** - * A description for the filter. You should use the - * NULL_IF_CONFIG_SMALL() macro to define it. - */ - const char *description; + int priv_size; ///< size of private data to allocate for the filter } AVFilter; /** An instance of a filter */ From f892013ac47cf1dd3c0c2d1ccb08a7822e869efa Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 21 Jun 2012 11:48:58 +0200 Subject: [PATCH 04/18] lavfi: reorder AVFilterContext fields. Place related fields together, remove holes. --- libavfilter/avfilter.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index bbbc53ed0f..1761488ac2 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -417,22 +417,21 @@ struct AVFilterContext { char *name; ///< name of this filter instance + AVFilterPad *input_pads; ///< array of input pads + AVFilterLink **inputs; ///< array of pointers to input links #if FF_API_FOO_COUNT unsigned input_count; ///< @deprecated use nb_inputs #endif - AVFilterPad *input_pads; ///< array of input pads - AVFilterLink **inputs; ///< array of pointers to input links + unsigned nb_inputs; ///< number of input pads + AVFilterPad *output_pads; ///< array of output pads + AVFilterLink **outputs; ///< array of pointers to output links #if FF_API_FOO_COUNT unsigned output_count; ///< @deprecated use nb_outputs #endif - AVFilterPad *output_pads; ///< array of output pads - AVFilterLink **outputs; ///< array of pointers to output links + unsigned nb_outputs; ///< number of output pads void *priv; ///< private data for use by the filter - - unsigned nb_inputs; ///< number of input pads - unsigned nb_outputs; ///< number of output pads }; /** From 83ba22392d046a7dbec247860ad88d8113aac7b0 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 21 Jun 2012 11:48:58 +0200 Subject: [PATCH 05/18] lavfi: reorder AVFilterLink fields. Move private fields to the private section, remove holes. --- libavfilter/avfilter.h | 54 +++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 1761488ac2..aaf86e9c97 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -448,13 +448,6 @@ struct AVFilterLink { AVFilterContext *dst; ///< dest filter AVFilterPad *dstpad; ///< input pad on the dest filter - /** stage of the initialization of the link properties (dimensions, etc) */ - enum { - AVLINK_UNINIT = 0, ///< not started - AVLINK_STARTINIT, ///< started, but incomplete - AVLINK_INIT ///< complete - } init_state; - enum AVMediaType type; ///< filter media type /* These parameters apply only to video */ @@ -467,26 +460,6 @@ struct AVFilterLink { int format; ///< agreed upon media format - /** - * Lists of formats supported by the input and output filters respectively. - * These lists are used for negotiating the format to actually be used, - * which will be loaded into the format member, above, when chosen. - */ - AVFilterFormats *in_formats; - AVFilterFormats *out_formats; - - /** - * The buffer reference currently being sent across the link by the source - * filter. This is used internally by the filter system to allow - * automatic copying of buffers which do not have sufficient permissions - * for the destination. This should not be accessed directly by the - * filters. - */ - AVFilterBufferRef *src_buf; - - AVFilterBufferRef *cur_buf; - AVFilterBufferRef *out_buf; - /** * Define the time base used by the PTS of the frames/samples * which will pass through this link. @@ -503,6 +476,14 @@ struct AVFilterLink { * New public fields should be added right above. ***************************************************************** */ + /** + * Lists of formats supported by the input and output filters respectively. + * These lists are used for negotiating the format to actually be used, + * which will be loaded into the format member, above, when chosen. + */ + AVFilterFormats *in_formats; + AVFilterFormats *out_formats; + /** * Lists of channel layouts and sample rates used for automatic * negotiation. @@ -520,6 +501,25 @@ struct AVFilterLink { * Last buffer before EOF will be padded with silence. */ int request_samples; + + /** stage of the initialization of the link properties (dimensions, etc) */ + enum { + AVLINK_UNINIT = 0, ///< not started + AVLINK_STARTINIT, ///< started, but incomplete + AVLINK_INIT ///< complete + } init_state; + + /** + * The buffer reference currently being sent across the link by the source + * filter. This is used internally by the filter system to allow + * automatic copying of buffers which do not have sufficient permissions + * for the destination. This should not be accessed directly by the + * filters. + */ + AVFilterBufferRef *src_buf; + + AVFilterBufferRef *cur_buf; + AVFilterBufferRef *out_buf; }; /** From b8c632a7204511cec4176dbdc8f2e5276b1ec3a2 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 26 Jun 2012 14:33:01 +0200 Subject: [PATCH 06/18] avconv: don't include vsrc_buffer.h, which doesn't exist anymore --- avconv.c | 1 - 1 file changed, 1 deletion(-) diff --git a/avconv.c b/avconv.c index 27dabc01f8..ff06bceafd 100644 --- a/avconv.c +++ b/avconv.c @@ -51,7 +51,6 @@ # include "libavfilter/avfiltergraph.h" # include "libavfilter/buffersrc.h" # include "libavfilter/buffersink.h" -# include "libavfilter/vsrc_buffer.h" #if HAVE_SYS_RESOURCE_H #include From 39dba5aa1b919c4b40619895bf3b4936fbe29deb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 25 Jun 2012 00:39:57 +0300 Subject: [PATCH 07/18] network: Include unistd.h from network.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This heaader is required for close() for sockets in network code. For winsock, the equivalent function is defined in the winsock2.h header. This avoids having the HAVE_UNISTD_H in all files dealing with raw sockets. Signed-off-by: Martin Storsjö --- libavformat/network.h | 4 ++++ libavformat/sctp.c | 1 - libavformat/tcp.c | 1 - libavformat/udp.c | 1 - 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libavformat/network.h b/libavformat/network.h index 1dc9deb675..3e4422e4c2 100644 --- a/libavformat/network.h +++ b/libavformat/network.h @@ -27,6 +27,10 @@ #include "libavutil/error.h" #include "os_support.h" +#if HAVE_UNISTD_H +#include +#endif + #if HAVE_WINSOCK2_H #include #include 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 #include -#include #include "config.h" diff --git a/libavformat/tcp.c b/libavformat/tcp.c index e77e4c5231..badc0ba935 100644 --- a/libavformat/tcp.c +++ b/libavformat/tcp.c @@ -20,7 +20,6 @@ */ #include "avformat.h" #include "libavutil/parseutils.h" -#include #include "internal.h" #include "network.h" #include "os_support.h" diff --git a/libavformat/udp.c b/libavformat/udp.c index 39db263e12..71b445b187 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -30,7 +30,6 @@ #include "avio_internal.h" #include "libavutil/parseutils.h" #include "libavutil/avstring.h" -#include #include "internal.h" #include "network.h" #include "os_support.h" From e64bceeac0cdf312d9481b3dd1ec1fda7ee2b94c Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Sun, 24 Jun 2012 22:20:21 +0300 Subject: [PATCH 08/18] configure: Check for sys/time.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apparently this include is needed on some systems for building the poll fallback (for the timeval struct for select?), but it isn't available on all systems. Thus only include it if it exists. Signed-off-by: Martin Storsjö --- configure | 2 ++ libavformat/os_support.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/configure b/configure index aa1856d673..52c25b484c 100755 --- a/configure +++ b/configure @@ -1148,6 +1148,7 @@ HAVE_LIST=" sys_resource_h sys_select_h sys_soundcard_h + sys_time_h sys_videoio_h threads trunc @@ -2873,6 +2874,7 @@ check_header sys/mman.h check_header sys/param.h check_header sys/resource.h check_header sys/select.h +check_header sys/time.h check_header unistd.h check_header vdpau/vdpau.h check_header vdpau/vdpau_x11.h diff --git a/libavformat/os_support.c b/libavformat/os_support.c index eaada4be0b..0cbaf453db 100644 --- a/libavformat/os_support.c +++ b/libavformat/os_support.c @@ -58,7 +58,9 @@ int ff_win32_open(const char *filename_utf8, int oflag, int pmode) #if CONFIG_NETWORK #include #if !HAVE_POLL_H +#if HAVE_SYS_TIME_H #include +#endif #if HAVE_WINSOCK2_H #include #elif HAVE_SYS_SELECT_H From 4b1b1449d95b3567d055fc410a1db137c811229c Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Sat, 23 Jun 2012 15:00:17 +0300 Subject: [PATCH 09/18] network: Don't redefine error codes if they already exist in errno.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since the errno.h values don't match the error codes that winsock returns, map the winsock error codes to the errno ones, to make sure explicit checks against AVERROR(x) match. Signed-off-by: Martin Storsjö --- libavformat/network.c | 8 ++++++++ libavformat/network.h | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/libavformat/network.c b/libavformat/network.c index 432084faa4..c2f7a9b0de 100644 --- a/libavformat/network.c +++ b/libavformat/network.c @@ -164,6 +164,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 3e4422e4c2..793cfee9a9 100644 --- a/libavformat/network.h +++ b/libavformat/network.h @@ -35,10 +35,19 @@ #include #include +#ifndef EPROTONOSUPPORT #define EPROTONOSUPPORT WSAEPROTONOSUPPORT +#endif +#ifndef ETIMEDOUT #define ETIMEDOUT WSAETIMEDOUT +#endif +#ifndef ECONNREFUSED #define ECONNREFUSED WSAECONNREFUSED +#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) From 153335625c429d2e4ab6a4d2d704d7eb91293290 Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Fri, 22 Jun 2012 15:37:46 +0100 Subject: [PATCH 10/18] libm: provide fallback definition for cbrtf() using powf() This adds a fallback for cbrtf() using powf(x, 1/3). Since powf() with a non-integer exponent requires a non-negative base, special handling of negative inputs is needed. Signed-off-by: Mans Rullgard --- configure | 2 ++ libavutil/libm.h | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/configure b/configure index 52c25b484c..473393a4e8 100755 --- a/configure +++ b/configure @@ -1059,6 +1059,7 @@ HAVE_LIST=" asm_mod_y attribute_may_alias attribute_packed + cbrtf closesocket cmov dcbzl @@ -2918,6 +2919,7 @@ done check_lib math.h sin -lm && LIBM="-lm" enabled vaapi && require vaapi va/va.h vaInitialize -lva +check_mathfunc cbrtf check_mathfunc exp2 check_mathfunc exp2f check_mathfunc llrint diff --git a/libavutil/libm.h b/libavutil/libm.h index 783f3cdfab..b6d8a94fce 100644 --- a/libavutil/libm.h +++ b/libavutil/libm.h @@ -28,6 +28,13 @@ #include "config.h" #include "attributes.h" +#if !HAVE_CBRTF +static av_always_inline float cbrtf(float x) +{ + return x < 0 ? -powf(-x, 1.0 / 3.0) : powf(x, 1.0 / 3.0); +} +#endif + #if !HAVE_EXP2 #undef exp2 #define exp2(x) exp((x) * 0.693147180559945) From acd9948e74b942b21de465aad18825085d8887e5 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Wed, 2 May 2012 16:44:54 -0400 Subject: [PATCH 11/18] lavr: x86: fix ff_conv_fltp_to_flt_6ch function prototypes Changed to match the number of parameters in conv_func_interleave(), which is how they are called. The change isn't strictly necessary because the 4th parameter is not used, but the code is clearer if they match. --- libavresample/x86/audio_convert_init.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavresample/x86/audio_convert_init.c b/libavresample/x86/audio_convert_init.c index 637fd2fb14..2de49709c2 100644 --- a/libavresample/x86/audio_convert_init.c +++ b/libavresample/x86/audio_convert_init.c @@ -38,9 +38,12 @@ extern void ff_conv_flt_to_s16_sse2(int16_t *dst, const float *src, int len); extern void ff_conv_flt_to_s32_sse2(int32_t *dst, const float *src, int len); extern void ff_conv_flt_to_s32_avx (int32_t *dst, const float *src, int len); -extern void ff_conv_fltp_to_flt_6ch_mmx (float *dst, float *const *src, int len); -extern void ff_conv_fltp_to_flt_6ch_sse4(float *dst, float *const *src, int len); -extern void ff_conv_fltp_to_flt_6ch_avx (float *dst, float *const *src, int len); +extern void ff_conv_fltp_to_flt_6ch_mmx (float *dst, float *const *src, int len, + int channels); +extern void ff_conv_fltp_to_flt_6ch_sse4(float *dst, float *const *src, int len, + int channels); +extern void ff_conv_fltp_to_flt_6ch_avx (float *dst, float *const *src, int len, + int channels); av_cold void ff_audio_convert_init_x86(AudioConvert *ac) { From ce0a975689068f2fe70f43797ca6e8b4f6b52a4c Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Fri, 22 Jun 2012 20:48:40 +0200 Subject: [PATCH 12/18] mpc8: read APE tags. --- libavformat/Makefile | 2 +- libavformat/mpc8.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libavformat/Makefile b/libavformat/Makefile index f3f0372f8e..bf219c2581 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -150,7 +150,7 @@ OBJS-$(CONFIG_MP2_MUXER) += mp3enc.o rawenc.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 890404faf4..93848f4ebf 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" @@ -240,6 +241,12 @@ static int mpc8_read_header(AVFormatContext *s) st->duration = c->samples / (1152 << (st->codec->extradata[1]&3)*2); size -= avio_tell(pb) - pos; + if (pb->seekable) { + int64_t pos = avio_tell(s->pb); + ff_ape_parse_tag(s); + avio_seek(s->pb, pos, SEEK_SET); + } + return 0; } From 1a49a169eb74a978eb7b2a4f2caf3520b7741ee5 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 25 Jun 2012 06:31:38 +0200 Subject: [PATCH 13/18] lavfi: make filters less verbose. --- libavfilter/asrc_anullsrc.c | 2 +- libavfilter/avfilter.c | 2 +- libavfilter/buffersrc.c | 2 +- libavfilter/fifo.c | 1 - libavfilter/vf_aspect.c | 4 ++-- libavfilter/vf_blackframe.c | 2 +- libavfilter/vf_crop.c | 2 +- libavfilter/vf_cropdetect.c | 2 +- libavfilter/vf_drawbox.c | 2 +- libavfilter/vf_fade.c | 2 +- libavfilter/vf_fieldorder.c | 2 +- libavfilter/vf_frei0r.c | 18 +++++++++--------- libavfilter/vf_gradfun.c | 2 +- libavfilter/vf_hqdn3d.c | 2 +- libavfilter/vf_libopencv.c | 6 +++--- libavfilter/vf_overlay.c | 4 ++-- libavfilter/vf_pad.c | 2 +- libavfilter/vf_scale.c | 2 +- libavfilter/vf_setpts.c | 2 +- libavfilter/vf_settb.c | 2 +- libavfilter/vf_transpose.c | 2 +- libavfilter/vf_unsharp.c | 2 +- libavfilter/vf_yadif.c | 2 +- libavfilter/vsrc_color.c | 2 +- libavfilter/vsrc_movie.c | 2 +- libavfilter/vsrc_nullsrc.c | 2 +- 26 files changed, 37 insertions(+), 38 deletions(-) diff --git a/libavfilter/asrc_anullsrc.c b/libavfilter/asrc_anullsrc.c index 914952936f..c4339e9c01 100644 --- a/libavfilter/asrc_anullsrc.c +++ b/libavfilter/asrc_anullsrc.c @@ -68,7 +68,7 @@ static int config_props(AVFilterLink *outlink) chans_nb = av_get_channel_layout_nb_channels(priv->channel_layout); av_get_channel_layout_string(buf, sizeof(buf), chans_nb, priv->channel_layout); - av_log(outlink->src, AV_LOG_INFO, + av_log(outlink->src, AV_LOG_VERBOSE, "sample_rate:%"PRId64 " channel_layout:%"PRId64 " channel_layout_description:'%s'\n", priv->sample_rate, priv->channel_layout, buf); diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index b550169468..dc828153f9 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -101,7 +101,7 @@ int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt, int ret; unsigned dstpad_idx = link->dstpad - link->dst->input_pads; - av_log(link->dst, AV_LOG_INFO, "auto-inserting filter '%s' " + av_log(link->dst, AV_LOG_VERBOSE, "auto-inserting filter '%s' " "between the filter '%s' and the filter '%s'\n", filt->name, link->src->name, link->dst->name); diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c index e1311c022a..0b9d5d0829 100644 --- a/libavfilter/buffersrc.c +++ b/libavfilter/buffersrc.c @@ -178,7 +178,7 @@ static av_cold int init_video(AVFilterContext *ctx, const char *args) if (!(c->fifo = av_fifo_alloc(sizeof(AVFilterBufferRef*)))) return AVERROR(ENOMEM); - av_log(ctx, AV_LOG_INFO, "w:%d h:%d pixfmt:%s\n", c->w, c->h, av_pix_fmt_descriptors[c->pix_fmt].name); + av_log(ctx, AV_LOG_VERBOSE, "w:%d h:%d pixfmt:%s\n", c->w, c->h, av_pix_fmt_descriptors[c->pix_fmt].name); return 0; } diff --git a/libavfilter/fifo.c b/libavfilter/fifo.c index 40c3796bf9..234df7ffa5 100644 --- a/libavfilter/fifo.c +++ b/libavfilter/fifo.c @@ -55,7 +55,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args) FifoContext *fifo = ctx->priv; fifo->last = &fifo->root; - av_log(ctx, AV_LOG_INFO, "\n"); return 0; } diff --git a/libavfilter/vf_aspect.c b/libavfilter/vf_aspect.c index 65dc364ed8..4b58e5ea47 100644 --- a/libavfilter/vf_aspect.c +++ b/libavfilter/vf_aspect.c @@ -60,7 +60,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) if (aspect->aspect.den == 0) aspect->aspect = (AVRational) {0, 1}; - av_log(ctx, AV_LOG_INFO, "a:%d/%d\n", aspect->aspect.num, aspect->aspect.den); + av_log(ctx, AV_LOG_VERBOSE, "a:%d/%d\n", aspect->aspect.num, aspect->aspect.den); return 0; } @@ -83,7 +83,7 @@ static int setdar_config_props(AVFilterLink *inlink) aspect->aspect.num * inlink->h, aspect->aspect.den * inlink->w, 100); - av_log(inlink->dst, AV_LOG_INFO, "w:%d h:%d -> dar:%d/%d sar:%d/%d\n", + av_log(inlink->dst, AV_LOG_VERBOSE, "w:%d h:%d -> dar:%d/%d sar:%d/%d\n", inlink->w, inlink->h, dar.num, dar.den, aspect->aspect.num, aspect->aspect.den); inlink->sample_aspect_ratio = aspect->aspect; diff --git a/libavfilter/vf_blackframe.c b/libavfilter/vf_blackframe.c index 59c5b30a36..acf9f056cd 100644 --- a/libavfilter/vf_blackframe.c +++ b/libavfilter/vf_blackframe.c @@ -63,7 +63,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) if (args) sscanf(args, "%u:%u", &blackframe->bamount, &blackframe->bthresh); - av_log(ctx, AV_LOG_INFO, "bamount:%u bthresh:%u\n", + av_log(ctx, AV_LOG_VERBOSE, "bamount:%u bthresh:%u\n", blackframe->bamount, blackframe->bthresh); if (blackframe->bamount > 100 || blackframe->bthresh > 255) { diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c index cf9a0a3b8d..6d124c19d3 100644 --- a/libavfilter/vf_crop.c +++ b/libavfilter/vf_crop.c @@ -207,7 +207,7 @@ static int config_input(AVFilterLink *link) NULL, NULL, NULL, NULL, 0, ctx)) < 0) return AVERROR(EINVAL); - av_log(ctx, AV_LOG_INFO, "w:%d h:%d -> w:%d h:%d\n", + av_log(ctx, AV_LOG_VERBOSE, "w:%d h:%d -> w:%d h:%d\n", link->w, link->h, crop->w, crop->h); if (crop->w <= 0 || crop->h <= 0 || diff --git a/libavfilter/vf_cropdetect.c b/libavfilter/vf_cropdetect.c index d4e6c40240..f2e9e93d44 100644 --- a/libavfilter/vf_cropdetect.c +++ b/libavfilter/vf_cropdetect.c @@ -92,7 +92,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) if (args) sscanf(args, "%d:%d:%d", &cd->limit, &cd->round, &cd->reset_count); - av_log(ctx, AV_LOG_INFO, "limit:%d round:%d reset_count:%d\n", + av_log(ctx, AV_LOG_VERBOSE, "limit:%d round:%d reset_count:%d\n", cd->limit, cd->round, cd->reset_count); return 0; diff --git a/libavfilter/vf_drawbox.c b/libavfilter/vf_drawbox.c index dc9c718356..87c2ad74e6 100644 --- a/libavfilter/vf_drawbox.c +++ b/libavfilter/vf_drawbox.c @@ -87,7 +87,7 @@ static int config_input(AVFilterLink *inlink) if (drawbox->w == 0) drawbox->w = inlink->w; if (drawbox->h == 0) drawbox->h = inlink->h; - av_log(inlink->dst, AV_LOG_INFO, "x:%d y:%d w:%d h:%d color:0x%02X%02X%02X%02X\n", + av_log(inlink->dst, AV_LOG_VERBOSE, "x:%d y:%d w:%d h:%d color:0x%02X%02X%02X%02X\n", drawbox->w, drawbox->y, drawbox->w, drawbox->h, drawbox->yuv_color[Y], drawbox->yuv_color[U], drawbox->yuv_color[V], drawbox->yuv_color[A]); diff --git a/libavfilter/vf_fade.c b/libavfilter/vf_fade.c index 988cb42200..3e8b26c52b 100644 --- a/libavfilter/vf_fade.c +++ b/libavfilter/vf_fade.c @@ -64,7 +64,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) } fade->stop_frame = fade->start_frame + nb_frames; - av_log(ctx, AV_LOG_INFO, + av_log(ctx, AV_LOG_VERBOSE, "type:%s start_frame:%d nb_frames:%d\n", in_out, fade->start_frame, nb_frames); return 0; diff --git a/libavfilter/vf_fieldorder.c b/libavfilter/vf_fieldorder.c index a9347fd632..55e72389b2 100644 --- a/libavfilter/vf_fieldorder.c +++ b/libavfilter/vf_fieldorder.c @@ -58,7 +58,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) return AVERROR(EINVAL); } - av_log(ctx, AV_LOG_INFO, "output field order: %s\n", + av_log(ctx, AV_LOG_VERBOSE, "output field order: %s\n", fieldorder->dst_tff ? tff : bff); return 0; diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c index 38cac274a1..93ec92afa6 100644 --- a/libavfilter/vf_frei0r.c +++ b/libavfilter/vf_frei0r.c @@ -146,7 +146,7 @@ static int set_params(AVFilterContext *ctx, const char *params) return ret; } - av_log(ctx, AV_LOG_INFO, + av_log(ctx, AV_LOG_VERBOSE, "idx:%d name:'%s' type:%s explanation:'%s' ", i, info.name, info.type == F0R_PARAM_BOOL ? "bool" : @@ -157,7 +157,7 @@ static int set_params(AVFilterContext *ctx, const char *params) info.explanation); #ifdef DEBUG - av_log(ctx, AV_LOG_INFO, "value:"); + av_log(ctx, AV_LOG_DEBUG, "value:"); switch (info.type) { void *v; double d; @@ -168,31 +168,31 @@ static int set_params(AVFilterContext *ctx, const char *params) case F0R_PARAM_BOOL: v = &d; frei0r->get_param_value(frei0r->instance, v, i); - av_log(ctx, AV_LOG_INFO, "%s", d >= 0.5 && d <= 1.0 ? "y" : "n"); + av_log(ctx, AV_LOG_DEBUG, "%s", d >= 0.5 && d <= 1.0 ? "y" : "n"); break; case F0R_PARAM_DOUBLE: v = &d; frei0r->get_param_value(frei0r->instance, v, i); - av_log(ctx, AV_LOG_INFO, "%f", d); + av_log(ctx, AV_LOG_DEBUG, "%f", d); break; case F0R_PARAM_COLOR: v = &col; frei0r->get_param_value(frei0r->instance, v, i); - av_log(ctx, AV_LOG_INFO, "%f/%f/%f", col.r, col.g, col.b); + av_log(ctx, AV_LOG_DEBUG, "%f/%f/%f", col.r, col.g, col.b); break; case F0R_PARAM_POSITION: v = &pos; frei0r->get_param_value(frei0r->instance, v, i); - av_log(ctx, AV_LOG_INFO, "%lf/%lf", pos.x, pos.y); + av_log(ctx, AV_LOG_DEBUG, "%lf/%lf", pos.x, pos.y); break; default: /* F0R_PARAM_STRING */ v = s; frei0r->get_param_value(frei0r->instance, v, i); - av_log(ctx, AV_LOG_INFO, "'%s'\n", s); + av_log(ctx, AV_LOG_DEBUG, "'%s'\n", s); break; } #endif - av_log(ctx, AV_LOG_INFO, "\n"); + av_log(ctx, AV_LOG_VERBOSE, "\n"); } return 0; @@ -266,7 +266,7 @@ static av_cold int frei0r_init(AVFilterContext *ctx, return AVERROR(EINVAL); } - av_log(ctx, AV_LOG_INFO, + av_log(ctx, AV_LOG_VERBOSE, "name:%s author:'%s' explanation:'%s' color_model:%s " "frei0r_version:%d version:%d.%d num_params:%d\n", pi->name, pi->author, pi->explanation, diff --git a/libavfilter/vf_gradfun.c b/libavfilter/vf_gradfun.c index 24ebcd4cf5..12977d92b7 100644 --- a/libavfilter/vf_gradfun.c +++ b/libavfilter/vf_gradfun.c @@ -142,7 +142,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) if (HAVE_SSE && cpu_flags & AV_CPU_FLAG_SSE2) gf->blur_line = ff_gradfun_blur_line_sse2; - av_log(ctx, AV_LOG_INFO, "threshold:%.2f radius:%d\n", thresh, gf->radius); + av_log(ctx, AV_LOG_VERBOSE, "threshold:%.2f radius:%d\n", thresh, gf->radius); return 0; } diff --git a/libavfilter/vf_hqdn3d.c b/libavfilter/vf_hqdn3d.c index 0b35f1124b..af69d417c4 100644 --- a/libavfilter/vf_hqdn3d.c +++ b/libavfilter/vf_hqdn3d.c @@ -238,7 +238,7 @@ static int init(AVFilterContext *ctx, const char *args) } } - av_log(ctx, AV_LOG_INFO, "ls:%lf cs:%lf lt:%lf ct:%lf\n", + av_log(ctx, AV_LOG_VERBOSE, "ls:%lf cs:%lf lt:%lf ct:%lf\n", LumSpac, ChromSpac, LumTmp, ChromTmp); if (LumSpac < 0 || ChromSpac < 0 || isnan(ChromTmp)) { av_log(ctx, AV_LOG_ERROR, diff --git a/libavfilter/vf_libopencv.c b/libavfilter/vf_libopencv.c index 438b73b9b3..ac892d948f 100644 --- a/libavfilter/vf_libopencv.c +++ b/libavfilter/vf_libopencv.c @@ -121,7 +121,7 @@ static av_cold int smooth_init(AVFilterContext *ctx, const char *args) return AVERROR(EINVAL); } - av_log(ctx, AV_LOG_INFO, "type:%s param1:%d param2:%d param3:%f param4:%f\n", + av_log(ctx, AV_LOG_VERBOSE, "type:%s param1:%d param2:%d param3:%f param4:%f\n", type_str, smooth->param1, smooth->param2, smooth->param3, smooth->param4); return 0; } @@ -239,7 +239,7 @@ static int parse_iplconvkernel(IplConvKernel **kernel, char *buf, void *log_ctx) if (!*kernel) return AVERROR(ENOMEM); - av_log(log_ctx, AV_LOG_INFO, "Structuring element: w:%d h:%d x:%d y:%d shape:%s\n", + av_log(log_ctx, AV_LOG_VERBOSE, "Structuring element: w:%d h:%d x:%d y:%d shape:%s\n", rows, cols, anchor_x, anchor_y, shape_str); return 0; } @@ -269,7 +269,7 @@ static av_cold int dilate_init(AVFilterContext *ctx, const char *args) av_free(kernel_str); sscanf(buf, ":%d", &dilate->nb_iterations); - av_log(ctx, AV_LOG_INFO, "iterations_nb:%d\n", dilate->nb_iterations); + av_log(ctx, AV_LOG_VERBOSE, "iterations_nb:%d\n", dilate->nb_iterations); if (dilate->nb_iterations <= 0) { av_log(ctx, AV_LOG_ERROR, "Invalid non-positive value '%d' for nb_iterations\n", dilate->nb_iterations); diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c index b426544353..9852853a52 100644 --- a/libavfilter/vf_overlay.c +++ b/libavfilter/vf_overlay.c @@ -151,7 +151,7 @@ static int config_input_overlay(AVFilterLink *inlink) goto fail; over->x = res; - av_log(ctx, AV_LOG_INFO, + av_log(ctx, AV_LOG_VERBOSE, "main w:%d h:%d fmt:%s overlay x:%d y:%d w:%d h:%d fmt:%s\n", ctx->inputs[MAIN]->w, ctx->inputs[MAIN]->h, av_pix_fmt_descriptors[ctx->inputs[MAIN]->format].name, @@ -190,7 +190,7 @@ static int config_output(AVFilterLink *outlink) av_gcd((int64_t)tb1.num * tb2.den, (int64_t)tb2.num * tb1.den), (int64_t)tb1.den * tb2.den, INT_MAX); - av_log(ctx, AV_LOG_INFO, + av_log(ctx, AV_LOG_VERBOSE, "main_tb:%d/%d overlay_tb:%d/%d -> tb:%d/%d exact:%d\n", tb1.num, tb1.den, tb2.num, tb2.den, tb->num, tb->den, exact); if (!exact) diff --git a/libavfilter/vf_pad.c b/libavfilter/vf_pad.c index db4e927a42..de7ae0086b 100644 --- a/libavfilter/vf_pad.c +++ b/libavfilter/vf_pad.c @@ -220,7 +220,7 @@ static int config_input(AVFilterLink *inlink) ff_fill_line_with_color(pad->line, pad->line_step, pad->w, pad->color, inlink->format, rgba_color, &is_packed_rgba, NULL); - av_log(ctx, AV_LOG_INFO, "w:%d h:%d -> w:%d h:%d x:%d y:%d color:0x%02X%02X%02X%02X[%s]\n", + av_log(ctx, AV_LOG_VERBOSE, "w:%d h:%d -> w:%d h:%d x:%d y:%d color:0x%02X%02X%02X%02X[%s]\n", inlink->w, inlink->h, pad->w, pad->h, pad->x, pad->y, pad->color[0], pad->color[1], pad->color[2], pad->color[3], is_packed_rgba ? "rgba" : "yuva"); diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index 4e51b4f9f5..2786993183 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -215,7 +215,7 @@ static int config_props(AVFilterLink *outlink) outlink->h = h; /* TODO: make algorithm configurable */ - av_log(ctx, AV_LOG_INFO, "w:%d h:%d fmt:%s -> w:%d h:%d fmt:%s flags:0x%0x\n", + av_log(ctx, AV_LOG_VERBOSE, "w:%d h:%d fmt:%s -> w:%d h:%d fmt:%s flags:0x%0x\n", inlink ->w, inlink ->h, av_pix_fmt_descriptors[ inlink->format].name, outlink->w, outlink->h, av_pix_fmt_descriptors[outlink->format].name, scale->flags); diff --git a/libavfilter/vf_setpts.c b/libavfilter/vf_setpts.c index 6f8290d93d..ecffc0f868 100644 --- a/libavfilter/vf_setpts.c +++ b/libavfilter/vf_setpts.c @@ -94,7 +94,7 @@ static int config_input(AVFilterLink *inlink) setpts->var_values[VAR_TB] = av_q2d(inlink->time_base); - av_log(inlink->src, AV_LOG_INFO, "TB:%f\n", setpts->var_values[VAR_TB]); + av_log(inlink->src, AV_LOG_VERBOSE, "TB:%f\n", setpts->var_values[VAR_TB]); return 0; } diff --git a/libavfilter/vf_settb.c b/libavfilter/vf_settb.c index 7b23751fda..62084bf9e8 100644 --- a/libavfilter/vf_settb.c +++ b/libavfilter/vf_settb.c @@ -97,7 +97,7 @@ static int config_output_props(AVFilterLink *outlink) } outlink->time_base = time_base; - av_log(outlink->src, AV_LOG_INFO, "tb:%d/%d -> tb:%d/%d\n", + av_log(outlink->src, AV_LOG_VERBOSE, "tb:%d/%d -> tb:%d/%d\n", inlink ->time_base.num, inlink ->time_base.den, outlink->time_base.num, outlink->time_base.den); diff --git a/libavfilter/vf_transpose.c b/libavfilter/vf_transpose.c index 7f8e025be0..f78244e6bd 100644 --- a/libavfilter/vf_transpose.c +++ b/libavfilter/vf_transpose.c @@ -110,7 +110,7 @@ static int config_props_output(AVFilterLink *outlink) } else outlink->sample_aspect_ratio = inlink->sample_aspect_ratio; - av_log(ctx, AV_LOG_INFO, "w:%d h:%d dir:%d -> w:%d h:%d rotation:%s vflip:%d\n", + av_log(ctx, AV_LOG_VERBOSE, "w:%d h:%d dir:%d -> w:%d h:%d rotation:%s vflip:%d\n", inlink->w, inlink->h, trans->dir, outlink->w, outlink->h, trans->dir == 1 || trans->dir == 3 ? "clockwise" : "counterclockwise", trans->dir == 0 || trans->dir == 3); diff --git a/libavfilter/vf_unsharp.c b/libavfilter/vf_unsharp.c index 1e9c0ee59f..ddfbf2cd3c 100644 --- a/libavfilter/vf_unsharp.c +++ b/libavfilter/vf_unsharp.c @@ -177,7 +177,7 @@ static void init_filter_param(AVFilterContext *ctx, FilterParam *fp, const char effect = fp->amount == 0 ? "none" : fp->amount < 0 ? "blur" : "sharpen"; - av_log(ctx, AV_LOG_INFO, "effect:%s type:%s msize_x:%d msize_y:%d amount:%0.2f\n", + av_log(ctx, AV_LOG_VERBOSE, "effect:%s type:%s msize_x:%d msize_y:%d amount:%0.2f\n", effect, effect_type, fp->msize_x, fp->msize_y, fp->amount / 65535.0); for (z = 0; z < 2 * fp->steps_y; z++) diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c index 51b273e818..08c543615a 100644 --- a/libavfilter/vf_yadif.c +++ b/libavfilter/vf_yadif.c @@ -414,7 +414,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) else if (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) yadif->filter_line = ff_yadif_filter_line_mmx; - av_log(ctx, AV_LOG_INFO, "mode:%d parity:%d auto_enable:%d\n", yadif->mode, yadif->parity, yadif->auto_enable); + av_log(ctx, AV_LOG_VERBOSE, "mode:%d parity:%d auto_enable:%d\n", yadif->mode, yadif->parity, yadif->auto_enable); return 0; } diff --git a/libavfilter/vsrc_color.c b/libavfilter/vsrc_color.c index 1591d65464..2d361a1b69 100644 --- a/libavfilter/vsrc_color.c +++ b/libavfilter/vsrc_color.c @@ -127,7 +127,7 @@ static int color_config_props(AVFilterLink *inlink) ff_fill_line_with_color(color->line, color->line_step, color->w, color->color, inlink->format, rgba_color, &is_packed_rgba, NULL); - av_log(ctx, AV_LOG_INFO, "w:%d h:%d r:%d/%d color:0x%02x%02x%02x%02x[%s]\n", + av_log(ctx, AV_LOG_VERBOSE, "w:%d h:%d r:%d/%d color:0x%02x%02x%02x%02x[%s]\n", color->w, color->h, color->time_base.den, color->time_base.num, color->color[0], color->color[1], color->color[2], color->color[3], is_packed_rgba ? "rgba" : "yuva"); diff --git a/libavfilter/vsrc_movie.c b/libavfilter/vsrc_movie.c index 2b79d85aeb..512d92949a 100644 --- a/libavfilter/vsrc_movie.c +++ b/libavfilter/vsrc_movie.c @@ -155,7 +155,7 @@ static int movie_init(AVFilterContext *ctx) movie->w = movie->codec_ctx->width; movie->h = movie->codec_ctx->height; - av_log(ctx, AV_LOG_INFO, "seek_point:%"PRIi64" format_name:%s file_name:%s stream_index:%d\n", + av_log(ctx, AV_LOG_VERBOSE, "seek_point:%"PRIi64" format_name:%s file_name:%s stream_index:%d\n", movie->seek_point, movie->format_name, movie->file_name, movie->stream_index); diff --git a/libavfilter/vsrc_nullsrc.c b/libavfilter/vsrc_nullsrc.c index 97c56cc33f..089188dcce 100644 --- a/libavfilter/vsrc_nullsrc.c +++ b/libavfilter/vsrc_nullsrc.c @@ -100,7 +100,7 @@ static int config_props(AVFilterLink *outlink) outlink->h = priv->h; outlink->time_base = tb; - av_log(outlink->src, AV_LOG_INFO, "w:%d h:%d tb:%d/%d\n", priv->w, priv->h, + av_log(outlink->src, AV_LOG_VERBOSE, "w:%d h:%d tb:%d/%d\n", priv->w, priv->h, tb.num, tb.den); return 0; From 422008ac6320561d38e3024dbb40690be14b2e7b Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 25 Jun 2012 12:53:18 +0200 Subject: [PATCH 14/18] amix: fix format specifier for AVFilterLink.sample_rate. It is a plain int now. --- libavfilter/af_amix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c index 156799c44a..8ceb179e58 100644 --- a/libavfilter/af_amix.c +++ b/libavfilter/af_amix.c @@ -261,7 +261,7 @@ static int config_output(AVFilterLink *outlink) av_get_channel_layout_string(buf, sizeof(buf), -1, outlink->channel_layout); av_log(ctx, AV_LOG_VERBOSE, - "inputs:%d fmt:%s srate:%"PRId64" cl:%s\n", s->nb_inputs, + "inputs:%d fmt:%s srate:%d cl:%s\n", s->nb_inputs, av_get_sample_fmt_name(outlink->format), outlink->sample_rate, buf); return 0; From fd2784c3b5e5ea13dd308b1eeeef0dd3c22a3d4a Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 25 Jun 2012 12:57:16 +0200 Subject: [PATCH 15/18] af_join: initialize a variable to shut up gcc warning. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The warning silenced was: libavfilter/af_join.c: In function ‘join_request_frame’: libavfilter/af_join.c:451:9: warning: ‘nb_samples’ may be used uninitialized in this function [-Wuninitialized] --- libavfilter/af_join.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c index 89bc47fde1..e86c556f5b 100644 --- a/libavfilter/af_join.c +++ b/libavfilter/af_join.c @@ -419,7 +419,7 @@ static int join_request_frame(AVFilterLink *outlink) JoinBufferPriv *priv; int linesize = INT_MAX; int perms = ~0; - int nb_samples; + int nb_samples = 0; int i, j, ret; /* get a frame on each input */ @@ -448,6 +448,7 @@ static int join_request_frame(AVFilterLink *outlink) perms &= cur_buf->perms; } + av_assert0(nb_samples > 0); buf = avfilter_get_audio_buffer_ref_from_arrays(s->data, linesize, perms, nb_samples, outlink->format, outlink->channel_layout); From 61d158c321a82ec7bfc46ce480997797e8048b85 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 25 Jun 2012 13:01:31 +0200 Subject: [PATCH 16/18] avfiltergraph: shut up uninitialized variable warning. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The warning silenced was: libavfilter/avfiltergraph.c: In function ‘avfilter_graph_config’: libavfilter/avfiltergraph.c:500:13: warning: ‘best_idx’ may be used uninitialized in this function [-Wuninitialized] --- libavfilter/avfiltergraph.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index b9f01645d0..c147c3b781 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -29,6 +29,7 @@ #include "internal.h" #include "libavutil/audioconvert.h" +#include "libavutil/avassert.h" #include "libavutil/log.h" static const AVClass filtergraph_class = { @@ -497,7 +498,7 @@ static void swap_sample_fmts_on_filter(AVFilterContext *filter) for (i = 0; i < filter->nb_outputs; i++) { AVFilterLink *outlink = filter->outputs[i]; - int best_idx, best_score = INT_MIN; + int best_idx = -1, best_score = INT_MIN; if (outlink->type != AVMEDIA_TYPE_AUDIO || outlink->in_formats->format_count < 2) @@ -530,6 +531,7 @@ static void swap_sample_fmts_on_filter(AVFilterContext *filter) best_idx = j; } } + av_assert0(best_idx >= 0); FFSWAP(int, outlink->in_formats->formats[0], outlink->in_formats->formats[best_idx]); } From 74853ed3f845212f4092e7b7e89dc2262926f4f5 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 25 Jun 2012 13:16:57 +0200 Subject: [PATCH 17/18] avconv: shut up an uninitialized variable warning. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The warning silenced was: avconv.c: In function ‘configure_filtergraph’: avconv.c:603:8: warning: ‘ist’ may be used uninitialized in this function [-Wuninitialized] avconv.c:549:18: note: ‘ist’ was declared here --- avconv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/avconv.c b/avconv.c index ff06bceafd..7aacbe0da7 100644 --- a/avconv.c +++ b/avconv.c @@ -546,7 +546,7 @@ static FilterGraph *init_simple_filtergraph(InputStream *ist, OutputStream *ost) static void init_input_filter(FilterGraph *fg, AVFilterInOut *in) { - InputStream *ist; + InputStream *ist = NULL; enum AVMediaType type = avfilter_pad_get_type(in->filter_ctx->input_pads, in->pad_idx); int i; @@ -598,6 +598,8 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in) exit_program(1); } } + av_assert0(ist); + ist->discard = 0; ist->decoding_needed = 1; ist->st->discard = AVDISCARD_NONE; From c29c1a1b6bade2b9118c7fa01239c622c2238656 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 25 Jun 2012 13:19:51 +0200 Subject: [PATCH 18/18] avconv: add an assert to silence an uninitialized variable warning. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The warning silenced was: avconv.c: In function ‘opt_output_file’: avconv.c:3380:21: warning: ‘meta_out’ may be used uninitialized in this function [-Wuninitialized] avconv.c:3315:20: note: ‘meta_out’ was declared here --- avconv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/avconv.c b/avconv.c index 7aacbe0da7..3eb249dcee 100644 --- a/avconv.c +++ b/avconv.c @@ -3350,6 +3350,7 @@ static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFor METADATA_CHECK_INDEX(index, context->nb_programs, "program")\ meta = &context->programs[index]->metadata;\ break;\ + default: av_assert0(0);\ }\ SET_DICT(type_in, meta_in, ic, idx_in);