From 01e98b1b006c67ab0948f3c1de65a94609fe79cf Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 17 May 2012 12:42:03 +0200 Subject: [PATCH 1/6] avconv: fix behavior with -ss as an output option. Don't return from poll_filters() immediately, there may be other frames and/or other streams to handle. Fixes a memleak. --- avconv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/avconv.c b/avconv.c index 85ee6f7e25..07bb86d4d1 100644 --- a/avconv.c +++ b/avconv.c @@ -1704,8 +1704,10 @@ static int poll_filters(void) AV_TIME_BASE_Q, ost->st->codec->time_base); - if (of->start_time && filtered_frame->pts < of->start_time) - return 0; + if (of->start_time && filtered_frame->pts < of->start_time) { + avfilter_unref_buffer(picref); + continue; + } switch (ost->filter->filter->inputs[0]->type) { case AVMEDIA_TYPE_VIDEO: From 4b7304e80d5f4312e34a748e6c34eb6a7346af7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 16 May 2012 11:45:47 +0300 Subject: [PATCH 2/6] rtmp: Don't assume path points to a string of nonzero length MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If using the new -rtmp_app and -rtmp_playpath parameters, one can in many cases set the main url to just rtmp://server/. If the trailing slash is omitted, path is a string of zero length, and using path+1 will end up reading uninitialized data. Signed-off-by: Martin Storsjö --- libavformat/rtmpproto.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index 427655c27e..1b86c44f00 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -895,9 +895,10 @@ static int rtmp_open(URLContext *s, const char *uri, int flags) fname = path + 10; memcpy(rt->app, "ondemand", 9); } else { - char *p = strchr(path + 1, '/'); + char *next = *path ? path + 1 : path; + char *p = strchr(next, '/'); if (!p) { - fname = path + 1; + fname = next; rt->app[0] = '\0'; } else { char *c = strchr(p + 1, ':'); From ab5c38ec454c387090ab45082ab7f006f7ef0ccb Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Fri, 18 May 2012 11:43:07 +0100 Subject: [PATCH 3/6] fate: remove unused code from regressions-funcs.sh The only uses of the do_avconv_nomd5() function were removed in 85cf49f. Signed-off-by: Mans Rullgard --- tests/regression-funcs.sh | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/tests/regression-funcs.sh b/tests/regression-funcs.sh index c6ca00b2aa..8219e54a9c 100755 --- a/tests/regression-funcs.sh +++ b/tests/regression-funcs.sh @@ -71,21 +71,6 @@ do_avconv() fi } -do_avconv_nomd5() -{ - f="$1" - shift - set -- $* ${target_path}/$f - run_avconv $* - if [ $f = $raw_dst ] ; then - $tiny_psnr $f $raw_ref - elif [ $f = $pcm_dst ] ; then - $tiny_psnr $f $pcm_ref 2 - else - echo $(wc -c $f) - fi -} - do_avconv_crc() { f="$1" From 4cc8e153715ed9757974e4976c5766d2e731bee0 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Tue, 15 May 2012 10:57:51 +0200 Subject: [PATCH 4/6] fate: Set FUZZ factor of (e)ac3-encode test to 3. This is necessary to account for different rounding done in the 3DNow! Assembly optimizations. --- tests/fate/ac3.mak | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/fate/ac3.mak b/tests/fate/ac3.mak index ed2ce12c0e..6db61bd074 100644 --- a/tests/fate/ac3.mak +++ b/tests/fate/ac3.mak @@ -35,6 +35,7 @@ fate-ac3-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav fate-ac3-encode: CMP_SHIFT = -1024 fate-ac3-encode: CMP_TARGET = 399.62 fate-ac3-encode: SIZE_TOLERANCE = 488 +fate-ac3-encode: FUZZ = 3 FATE_AC3 += fate-eac3-encode fate-eac3-encode: CMD = enc_dec_pcm eac3 wav s16le $(REF) -c:a eac3 -b:a 128k @@ -43,6 +44,7 @@ fate-eac3-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav fate-eac3-encode: CMP_SHIFT = -1024 fate-eac3-encode: CMP_TARGET = 514.02 fate-eac3-encode: SIZE_TOLERANCE = 488 +fate-eac3-encode: FUZZ = 3 FATE_AVCONV += $(FATE_AC3) fate-ac3: $(FATE_AC3) From 1afc278994364f680a7b490d3dd9d7a5265f7bc3 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Tue, 15 May 2012 15:00:15 +0200 Subject: [PATCH 5/6] fate: Set FUZZ factor of vorbis-13 test to 2. This is necessary to account for different rounding done in the 3DNow! Assembly optimizations. --- tests/fate/vorbis.mak | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/fate/vorbis.mak b/tests/fate/vorbis.mak index 25a5d89796..578d7c4871 100644 --- a/tests/fate/vorbis.mak +++ b/tests/fate/vorbis.mak @@ -49,6 +49,7 @@ fate-vorbis-12: REF = $(SAMPLES)/vorbis/mono_small.pcm FATE_VORBIS += fate-vorbis-13 fate-vorbis-13: CMD = pcm -i $(SAMPLES)/vorbis/moog_small.ogg fate-vorbis-13: REF = $(SAMPLES)/vorbis/moog_small.pcm +fate-vorbis-13: FUZZ = 2 FATE_VORBIS += fate-vorbis-14 fate-vorbis-14: CMD = pcm -i $(SAMPLES)/vorbis/rc1-test_small.ogg From 90c9edba58eddf39e77937a6c602d7ff289c9bfd Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Wed, 16 May 2012 19:24:39 +0200 Subject: [PATCH 6/6] doc: Replace some @file tags by more suitable markup. --- doc/general.texi | 3 ++- doc/platform.texi | 8 ++++---- doc/protocols.texi | 10 +++++----- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/doc/general.texi b/doc/general.texi index 090e4c594b..680b971bc7 100644 --- a/doc/general.texi +++ b/doc/general.texi @@ -13,7 +13,8 @@ Libav can be hooked up with a number of external libraries to add support for more formats. None of them are used by default, their use has to be -explicitly requested by passing the appropriate flags to @file{./configure}. +explicitly requested by passing the appropriate flags to +@command{./configure}. @section OpenCORE and VisualOn libraries diff --git a/doc/platform.texi b/doc/platform.texi index c095f525d0..46e36c381a 100644 --- a/doc/platform.texi +++ b/doc/platform.texi @@ -27,11 +27,11 @@ to configure. @section BSD BSD make will not build Libav, you need to install and use GNU Make -(@file{gmake}). +(@command{gmake}). @section (Open)Solaris -GNU Make is required to build Libav, so you have to invoke (@file{gmake}), +GNU Make is required to build Libav, so you have to invoke (@command{gmake}), standard Solaris Make will not work. When building with a non-c99 front-end (gcc, generic suncc) add either @code{--extra-libs=/usr/lib/values-xpg6.o} or @code{--extra-libs=/usr/lib/64/values-xpg6.o} to the configure options @@ -241,7 +241,7 @@ To create import libraries that work with the @code{/OPT:REF} option @enumerate -@item Open @file{Visual Studio 2005 Command Prompt}. +@item Open @emph{Visual Studio 2005 Command Prompt}. Alternatively, in a normal command line prompt, call @file{vcvars32.bat} which sets up the environment variables for the Visual C++ tools @@ -251,7 +251,7 @@ which sets up the environment variables for the Visual C++ tools @item Enter the @file{bin} directory where the created LIB and DLL files are stored. -@item Generate new import libraries with @file{lib.exe}: +@item Generate new import libraries with @command{lib.exe}: @example lib /machine:i386 /def:..\lib\foo-version.def /out:foo.lib diff --git a/doc/protocols.texi b/doc/protocols.texi index b08233ec80..d6e12f73e3 100644 --- a/doc/protocols.texi +++ b/doc/protocols.texi @@ -36,7 +36,7 @@ resource to be concatenated, each one possibly specifying a distinct protocol. For example to read a sequence of files @file{split1.mpeg}, -@file{split2.mpeg}, @file{split3.mpeg} with @file{avplay} use the +@file{split2.mpeg}, @file{split3.mpeg} with @command{avplay} use the command: @example avplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg @@ -187,7 +187,7 @@ application specified in @var{app}, may be prefixed by "mp4:". @end table -For example to read with @file{avplay} a multimedia resource named +For example to read with @command{avplay} a multimedia resource named "sample" from the application "vod" from an RTMP server "myserver": @example avplay rtmp://myserver/vod/sample @@ -228,7 +228,7 @@ For example, to stream a file in real-time to an RTMP server using avconv -re -i myfile -f flv rtmp://myserver/live/mystream @end example -To play the same stream using @file{avplay}: +To play the same stream using @command{avplay}: @example avplay "rtmp://myserver/live/mystream live=1" @end example @@ -253,7 +253,7 @@ The required syntax for a RTSP url is: rtsp://@var{hostname}[:@var{port}]/@var{path} @end example -The following options (set on the @command{avconv}/@file{avplay} command +The following options (set on the @command{avconv}/@command{avplay} command line, or set in code via @code{AVOption}s or in @code{avformat_open_input}), are supported: @@ -292,7 +292,7 @@ When receiving data over UDP, the demuxer tries to reorder received packets can be disabled by setting the maximum demuxing delay to zero (via the @code{max_delay} field of AVFormatContext). -When watching multi-bitrate Real-RTSP streams with @file{avplay}, the +When watching multi-bitrate Real-RTSP streams with @command{avplay}, the streams to display can be chosen with @code{-vst} @var{n} and @code{-ast} @var{n} for video and audio respectively, and can be switched on the fly by pressing @code{v} and @code{a}.