[libav-devel] [PATCH] hls: Save and forward avio options

2015-07-29 Thread Luca Barbato
Make possible to send the custom headers and override the user agent.

Reported-by: BenWonder
---

Kept a single dictionary and grouped the open functions as Martin suggested.

 libavformat/hls.c | 91 +++
 1 file changed, 78 insertions(+), 13 deletions(-)

diff --git a/libavformat/hls.c b/libavformat/hls.c
index 8b52a35..e9f48ed 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -103,6 +103,7 @@ typedef struct HLSContext {
 int64_t seek_timestamp;
 int seek_flags;
 AVIOInterruptCB *interrupt_callback;
+AVDictionary *avio_opts;
 } HLSContext;

 static int read_chomp_line(AVIOContext *s, char *buf, int maxlen)
@@ -199,6 +200,49 @@ static void handle_key_args(struct key_info *info, const 
char *key,
 }
 }

+static int open_in(HLSContext *c, AVIOContext **in, const char *url)
+{
+AVDictionary *tmp = NULL;
+int ret;
+
+av_dict_copy(tmp, c-avio_opts, 0);
+
+ret = avio_open2(in, url, AVIO_FLAG_READ, c-interrupt_callback, tmp);
+
+av_dict_free(tmp);
+return ret;
+}
+
+static int url_connect(struct variant *var, AVDictionary *opts)
+{
+AVDictionary *tmp = NULL;
+int ret;
+
+av_dict_copy(tmp, opts, 0);
+
+if ((ret = ffurl_connect(var-input, tmp))  0) {
+ffurl_close(var-input);
+var-input = NULL;
+}
+
+av_dict_free(tmp);
+return ret;
+}
+
+static int open_url(HLSContext *c, URLContext **uc, const char *url)
+{
+AVDictionary *tmp = NULL;
+int ret;
+
+av_dict_copy(tmp, c-avio_opts, 0);
+
+ret = ffurl_open(uc, url, AVIO_FLAG_READ, c-interrupt_callback, tmp);
+
+av_dict_free(tmp);
+
+return ret;
+}
+
 static int parse_playlist(HLSContext *c, const char *url,
   struct variant *var, AVIOContext *in)
 {
@@ -214,10 +258,10 @@ static int parse_playlist(HLSContext *c, const char *url,
 uint8_t *new_url = NULL;

 if (!in) {
-close_in = 1;
-if ((ret = avio_open2(in, url, AVIO_FLAG_READ,
-  c-interrupt_callback, NULL))  0)
+ret = open_in(c, in, url);
+if (ret  0)
 return ret;
+close_in = 1;
 }

 if (av_opt_get(in, location, AV_OPT_SEARCH_CHILDREN, new_url) = 0)
@@ -333,15 +377,14 @@ static int open_input(struct variant *var)
 {
 struct segment *seg = var-segments[var-cur_seq_no - var-start_seq_no];
 if (seg-key_type == KEY_NONE) {
-return ffurl_open(var-input, seg-url, AVIO_FLAG_READ,
-  var-parent-interrupt_callback, NULL);
+return  open_url(var-parent-priv_data, var-input, seg-url);
 } else if (seg-key_type == KEY_AES_128) {
+HLSContext *c = var-parent-priv_data;
 char iv[33], key[33], url[MAX_URL_SIZE];
 int ret;
 if (strcmp(seg-key, var-key_url)) {
 URLContext *uc;
-if (ffurl_open(uc, seg-key, AVIO_FLAG_READ,
-   var-parent-interrupt_callback, NULL) == 0) {
+if (open_url(var-parent-priv_data, uc, seg-key) == 0) {
 if (ffurl_read_complete(uc, var-key, sizeof(var-key))
 != sizeof(var-key)) {
 av_log(NULL, AV_LOG_ERROR, Unable to read key file %s\n,
@@ -366,12 +409,8 @@ static int open_input(struct variant *var)
 return ret;
 av_opt_set(var-input-priv_data, key, key, 0);
 av_opt_set(var-input-priv_data, iv, iv, 0);
-if ((ret = ffurl_connect(var-input, NULL))  0) {
-ffurl_close(var-input);
-var-input = NULL;
-return ret;
-}
-return 0;
+
+return url_connect(var, c-avio_opts);
 }
 return AVERROR(ENOSYS);
 }
@@ -449,6 +488,26 @@ reload:
 goto restart;
 }

+static int save_avio_options(AVFormatContext *s)
+{
+HLSContext *c = s-priv_data;
+const char *opts[] = { headers, user_agent, NULL }, **opt = opts;
+uint8_t *buf;
+int ret = 0;
+
+while (*opt) {
+if (av_opt_get(s-pb, *opt, AV_OPT_SEARCH_CHILDREN, buf) = 0) {
+ret = av_dict_set(c-avio_opts, *opt, buf,
+  AV_DICT_DONT_STRDUP_VAL);
+if (ret  0)
+return ret;
+}
+opt++;
+}
+
+return ret;
+}
+
 static int hls_read_header(AVFormatContext *s)
 {
 HLSContext *c = s-priv_data;
@@ -459,6 +518,9 @@ static int hls_read_header(AVFormatContext *s)
 if ((ret = parse_playlist(c, s-filename, NULL, s-pb))  0)
 goto fail;

+if ((ret = save_avio_options(s))  0)
+goto fail;
+
 if (c-n_variants == 0) {
 av_log(NULL, AV_LOG_WARNING, Empty playlist\n);
 ret = AVERROR_EOF;
@@ -712,6 +774,9 @@ static int hls_close(AVFormatContext *s)
 HLSContext *c = s-priv_data;

 free_variant_list(c);
+
+av_dict_free(c-avio_opts);
+
 return 0;
 }

--
1.9.0

___
libav-devel mailing list
libav-devel@libav.org

Re: [libav-devel] [PATCH] checkasm: Include io.h for isatty, if available

2015-07-29 Thread Henrik Gramner
On Wed, Jul 29, 2015 at 10:09 PM, Martin Storsjö mar...@martin.st wrote:
 configure does check for isatty, and checkasm properly checks
 HAVE_ISATTY, but on some platforms (e.g. WinRT), io.h needs to be
 included for isatty to be available.

Ok.
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH] checkasm: Include io.h for isatty, if available

2015-07-29 Thread Luca Barbato
On 29/07/15 22:09, Martin Storsjö wrote:
 configure does check for isatty, and checkasm properly checks
 HAVE_ISATTY, but on some platforms (e.g. WinRT), io.h needs to be
 included for isatty to be available.
 ---
  tests/checkasm/checkasm.c | 4 
  1 file changed, 4 insertions(+)
 
 diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c
 index f1e9cd9..82c635e 100644
 --- a/tests/checkasm/checkasm.c
 +++ b/tests/checkasm/checkasm.c
 @@ -29,6 +29,10 @@
  #include libavutil/cpu.h
  #include libavutil/random_seed.h
  
 +#if HAVE_IO_H
 +#include io.h
 +#endif
 +
  #if ARCH_X86
  #include libavutil/x86/cpu.h
  #endif
 

Ok.
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH] h264: Parse only the x264 info unregisterd sei

2015-07-29 Thread Luca Barbato
And restrict the string to ascii text.

CC: libav-sta...@libav.org

Signed-off-by: Luca Barbato lu_z...@gentoo.org
---
 libavcodec/h264_sei.c | 57 ++-
 1 file changed, 47 insertions(+), 10 deletions(-)

diff --git a/libavcodec/h264_sei.c b/libavcodec/h264_sei.c
index 1f3844b..7361941 100644
--- a/libavcodec/h264_sei.c
+++ b/libavcodec/h264_sei.c
@@ -191,24 +191,61 @@ static int decode_registered_user_data(H264Context *h, 
int size)
 return 0;
 }
 
+static const uint8_t x264_version_uuid[] = {
+0xdc, 0x45, 0xe9, 0xbd, 0xe6, 0xd9, 0x48, 0xb7,
+0x96, 0x2c, 0xd8, 0x20, 0xd9, 0x23, 0xee, 0xef
+};
+
+static int decode_x264_version(H264Context *h, int size)
+{
+int build = 0, i = 0;
+uint8_t x264_string[256];
+
+if (size  13)
+goto skip;
+
+for (i = 0; i  size  i  sizeof(x264_string) - 1; i++)
+x264_string[i] = get_bits(h-gb, 8)  0x7f;
+
+x264_string[i] = 0;
+
+if (!memcmp(x264_string, x264 - core , 12))
+build = atoi(x264_string + 12);
+
+if (build  0)
+ h-x264_build = build;
+
+if (h-avctx-debug  FF_DEBUG_BUGS)
+av_log(h-avctx, AV_LOG_DEBUG, x264 version string:\%s\\n, 
x264_string);
+skip:
+for (; i  size; i++)
+skip_bits(h-gb, 8);
+
+return 0;
+}
+
 static int decode_unregistered_user_data(H264Context *h, int size)
 {
-uint8_t user_data[16 + 256];
-int e, build, i;
+int i;
+uint8_t uuid[16];
 
 if (size  16)
 return AVERROR_INVALIDDATA;
 
-for (i = 0; i  sizeof(user_data) - 1  i  size; i++)
-user_data[i] = get_bits(h-gb, 8);
+for (i = 0; i  16; i++)
+uuid[i] = get_bits(h-gb, 8);
 
-user_data[i] = 0;
-e = sscanf(user_data + 16, x264 - core %d, build);
-if (e == 1  build  0)
-h-x264_build = build;
+av_log(h-avctx, AV_LOG_DEBUG, uuid 0x%02x 0x%02x 0x%02x 0x%02x 
+   0x%02x 0x%02x 0x%02x 0x%02x 
+   0x%02x 0x%02x 0x%02x 0x%02x 
+   0x%02x 0x%02x 0x%02x 0x%02x\n,
+   uuid[0], uuid[1], uuid[2], uuid[3],
+   uuid[4], uuid[5], uuid[6], uuid[7],
+   uuid[8], uuid[9], uuid[10], uuid[11],
+   uuid[12], uuid[13], uuid[14], uuid[15]);
 
-if (h-avctx-debug  FF_DEBUG_BUGS)
-av_log(h-avctx, AV_LOG_DEBUG, user data:\%s\\n, user_data + 16);
+if (!memcmp(uuid, x264_version_uuid, 16))
+return decode_x264_version(h, size - 16);
 
 for (; i  size; i++)
 skip_bits(h-gb, 8);
-- 
1.9.0

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 3/3] rtmpproto: use AVHMAC instead of a custom implementation

2015-07-29 Thread Martin Storsjö

On Wed, 29 Jul 2015, James Almer wrote:


Signed-off-by: James Almer jamr...@gmail.com
---
libavformat/rtmp.h  |  3 ---
libavformat/rtmpproto.c | 39 ++-
2 files changed, 10 insertions(+), 32 deletions(-)


Ok

// Martin
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 2/2] fate: add test vectors for HMAC SHA and SHA-2

2015-07-29 Thread Martin Storsjö

On Tue, 28 Jul 2015, James Almer wrote:


Also replace custom tests for MD5 with those published in RFC 2202

Signed-off-by: James Almer jamr...@gmail.com
---
libavutil/hmac.c| 46 --
tests/ref/fate/hmac | 20 +---
2 files changed, 53 insertions(+), 13 deletions(-)


Ok

// Martin
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] hls: Save and forward avio options

2015-07-29 Thread Luca Barbato
On 29/07/15 21:02, Martin Storsjö wrote:
 Just passing the options to ffurl_connect might not be enough.
 
 Normally, if you do ffurl_open(), you can just pass the options to that
 function and be done with it. Internally, ffurl_open does ffurl_alloc,
 then does av_opt_set_dict and finally ffurl_connect(options). In most
 cases, the options are handled by av_opt_set_dict; the ffurl_connect is
 only relevant in the case if the options don't apply to this protocol
 but to a nested one.
 
 In this case, just do av_opt_set_dict+ffurl_connect, and you should be
 safe, regardless of what options you're dealing with.
 
 
 Other than that it looks good, thanks!

Ok, I'll update it and push then =)

lu

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] hls: Save and forward avio options

2015-07-29 Thread Martin Storsjö

On Wed, 29 Jul 2015, Luca Barbato wrote:


Make possible to send the custom headers and override the user agent.

Reported-by: BenWonder
---

Kept a single dictionary and grouped the open functions as Martin suggested.

libavformat/hls.c | 91 +++
1 file changed, 78 insertions(+), 13 deletions(-)

diff --git a/libavformat/hls.c b/libavformat/hls.c
index 8b52a35..e9f48ed 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -103,6 +103,7 @@ typedef struct HLSContext {
int64_t seek_timestamp;
int seek_flags;
AVIOInterruptCB *interrupt_callback;
+AVDictionary *avio_opts;
} HLSContext;

static int read_chomp_line(AVIOContext *s, char *buf, int maxlen)
@@ -199,6 +200,49 @@ static void handle_key_args(struct key_info *info, const 
char *key,
}
}

+static int open_in(HLSContext *c, AVIOContext **in, const char *url)
+{
+AVDictionary *tmp = NULL;
+int ret;
+
+av_dict_copy(tmp, c-avio_opts, 0);
+
+ret = avio_open2(in, url, AVIO_FLAG_READ, c-interrupt_callback, tmp);
+
+av_dict_free(tmp);
+return ret;
+}
+
+static int url_connect(struct variant *var, AVDictionary *opts)
+{
+AVDictionary *tmp = NULL;
+int ret;
+
+av_dict_copy(tmp, opts, 0);
+
+if ((ret = ffurl_connect(var-input, tmp))  0) {


Just passing the options to ffurl_connect might not be enough.

Normally, if you do ffurl_open(), you can just pass the options to that 
function and be done with it. Internally, ffurl_open does ffurl_alloc, 
then does av_opt_set_dict and finally ffurl_connect(options). In most 
cases, the options are handled by av_opt_set_dict; the ffurl_connect is 
only relevant in the case if the options don't apply to this protocol but 
to a nested one.


In this case, just do av_opt_set_dict+ffurl_connect, and you should be 
safe, regardless of what options you're dealing with.



Other than that it looks good, thanks!

// Martin
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH] checkasm: Include io.h for isatty, if available

2015-07-29 Thread Martin Storsjö
configure does check for isatty, and checkasm properly checks
HAVE_ISATTY, but on some platforms (e.g. WinRT), io.h needs to be
included for isatty to be available.
---
 tests/checkasm/checkasm.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c
index f1e9cd9..82c635e 100644
--- a/tests/checkasm/checkasm.c
+++ b/tests/checkasm/checkasm.c
@@ -29,6 +29,10 @@
 #include libavutil/cpu.h
 #include libavutil/random_seed.h
 
+#if HAVE_IO_H
+#include io.h
+#endif
+
 #if ARCH_X86
 #include libavutil/x86/cpu.h
 #endif
-- 
1.8.1.2

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/2] hmac: add support for SHA-2

2015-07-29 Thread Martin Storsjö

On Tue, 28 Jul 2015, James Almer wrote:


Signed-off-by: James Almer jamr...@gmail.com
---
libavutil/hmac.c | 31 ++-
libavutil/hmac.h |  2 ++
2 files changed, 28 insertions(+), 5 deletions(-)


Ok with me

// Martin
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH] rtmpproto: free hmac context properly

2015-07-29 Thread James Almer
Signed-off-by: James Almer jamr...@gmail.com
---
 libavformat/rtmpproto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 1db7495..ec4b0e7 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -971,7 +971,7 @@ int ff_rtmp_calc_digest(const uint8_t *src, int len, int 
gap,
 }
 av_hmac_final(hmac, dst, 32);
 
-av_free(hmac);
+av_hmac_free(hmac);
 
 return 0;
 }
-- 
2.5.0

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH 1/2] fate/mp3: specify the number of output samples instead of filesize

2015-07-29 Thread Anton Khirnov
This is not dependent on the output format.
---
 tests/fate/mp3.mak | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/fate/mp3.mak b/tests/fate/mp3.mak
index 3442ce1..ad19d70 100644
--- a/tests/fate/mp3.mak
+++ b/tests/fate/mp3.mak
@@ -3,27 +3,27 @@ fate-mp3-float-conf-compl: CMD = pcm -acodec mp3float -i 
$(TARGET_SAMPLES)/mp3-c
 fate-mp3-float-conf-compl: REF = $(SAMPLES)/mp3-conformance/compl_2.pcm
 
 FATE_MP3 += fate-mp3-float-conf-he_32khz
-fate-mp3-float-conf-he_32khz: CMD = pcm -acodec mp3float -i 
$(TARGET_SAMPLES)/mp3-conformance/he_32khz.bit -fs 343296
+fate-mp3-float-conf-he_32khz: CMD = pcm -acodec mp3float -i 
$(TARGET_SAMPLES)/mp3-conformance/he_32khz.bit -af atrim=end_sample=171648
 fate-mp3-float-conf-he_32khz: REF = $(SAMPLES)/mp3-conformance/he_32khz.pcm
 
 FATE_MP3 += fate-mp3-float-conf-he_44khz
-fate-mp3-float-conf-he_44khz: CMD = pcm -acodec mp3float -i 
$(TARGET_SAMPLES)/mp3-conformance/he_44khz.bit -fs 942336
+fate-mp3-float-conf-he_44khz: CMD = pcm -acodec mp3float -i 
$(TARGET_SAMPLES)/mp3-conformance/he_44khz.bit -af atrim=end_sample=471168
 fate-mp3-float-conf-he_44khz: REF = $(SAMPLES)/mp3-conformance/he_44khz.pcm
 
 FATE_MP3 += fate-mp3-float-conf-he_48khz
-fate-mp3-float-conf-he_48khz: CMD = pcm -acodec mp3float -i 
$(TARGET_SAMPLES)/mp3-conformance/he_48khz.bit -fs 343296
+fate-mp3-float-conf-he_48khz: CMD = pcm -acodec mp3float -i 
$(TARGET_SAMPLES)/mp3-conformance/he_48khz.bit -af atrim=end_sample=171648
 fate-mp3-float-conf-he_48khz: REF = $(SAMPLES)/mp3-conformance/he_48khz.pcm
 
 FATE_MP3 += fate-mp3-float-conf-hecommon
-fate-mp3-float-conf-hecommon: CMD = pcm -acodec mp3float -i 
$(TARGET_SAMPLES)/mp3-conformance/hecommon.bit -fs 133632
+fate-mp3-float-conf-hecommon: CMD = pcm -acodec mp3float -i 
$(TARGET_SAMPLES)/mp3-conformance/hecommon.bit -af atrim=end_sample=33408
 fate-mp3-float-conf-hecommon: REF = $(SAMPLES)/mp3-conformance/hecommon.pcm
 
 FATE_MP3 += fate-mp3-float-conf-si
-fate-mp3-float-conf-si: CMD = pcm -acodec mp3float -i 
$(TARGET_SAMPLES)/mp3-conformance/si.bit -fs 269568
+fate-mp3-float-conf-si: CMD = pcm -acodec mp3float -i 
$(TARGET_SAMPLES)/mp3-conformance/si.bit -af atrim=end_sample=134784
 fate-mp3-float-conf-si: REF = $(SAMPLES)/mp3-conformance/si.pcm
 
 FATE_MP3 += fate-mp3-float-conf-si_block
-fate-mp3-float-conf-si_block: CMD = pcm -acodec mp3float -i 
$(TARGET_SAMPLES)/mp3-conformance/si_block.bit -fs 145152
+fate-mp3-float-conf-si_block: CMD = pcm -acodec mp3float -i 
$(TARGET_SAMPLES)/mp3-conformance/si_block.bit -af atrim=end_sample=72576
 fate-mp3-float-conf-si_block: REF = $(SAMPLES)/mp3-conformance/si_block.pcm
 
 FATE_MP3 += fate-mp3-float-extra_overread
-- 
2.0.0

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH 2/2] fate/mp3: use the f32le format as output

2015-07-29 Thread Anton Khirnov
Those tests test the float decoder, so it is preferable to dump the
decoder output directly instead of converting it to s16.
---
 tests/fate/mp3.mak | 37 +++--
 1 file changed, 19 insertions(+), 18 deletions(-)

diff --git a/tests/fate/mp3.mak b/tests/fate/mp3.mak
index ad19d70..78832cb 100644
--- a/tests/fate/mp3.mak
+++ b/tests/fate/mp3.mak
@@ -1,37 +1,38 @@
 FATE_MP3 += fate-mp3-float-conf-compl
-fate-mp3-float-conf-compl: CMD = pcm -acodec mp3float -i 
$(TARGET_SAMPLES)/mp3-conformance/compl.bit
-fate-mp3-float-conf-compl: REF = $(SAMPLES)/mp3-conformance/compl_2.pcm
+fate-mp3-float-conf-compl: CMD = avconv -acodec mp3float -i 
$(TARGET_SAMPLES)/mp3-conformance/compl.bit -f f32le -
+fate-mp3-float-conf-compl: REF = $(SAMPLES)/mp3-conformance/compl.f32
 
 FATE_MP3 += fate-mp3-float-conf-he_32khz
-fate-mp3-float-conf-he_32khz: CMD = pcm -acodec mp3float -i 
$(TARGET_SAMPLES)/mp3-conformance/he_32khz.bit -af atrim=end_sample=171648
-fate-mp3-float-conf-he_32khz: REF = $(SAMPLES)/mp3-conformance/he_32khz.pcm
+fate-mp3-float-conf-he_32khz: CMD = avconv -acodec mp3float -i 
$(TARGET_SAMPLES)/mp3-conformance/he_32khz.bit -af atrim=end_sample=171648 -f 
f32le -
+fate-mp3-float-conf-he_32khz: REF = $(SAMPLES)/mp3-conformance/he_32khz.f32
 
 FATE_MP3 += fate-mp3-float-conf-he_44khz
-fate-mp3-float-conf-he_44khz: CMD = pcm -acodec mp3float -i 
$(TARGET_SAMPLES)/mp3-conformance/he_44khz.bit -af atrim=end_sample=471168
-fate-mp3-float-conf-he_44khz: REF = $(SAMPLES)/mp3-conformance/he_44khz.pcm
+fate-mp3-float-conf-he_44khz: CMD = avconv -acodec mp3float -i 
$(TARGET_SAMPLES)/mp3-conformance/he_44khz.bit -af atrim=end_sample=471168 -f 
f32le -
+fate-mp3-float-conf-he_44khz: REF = $(SAMPLES)/mp3-conformance/he_44khz.f32
 
 FATE_MP3 += fate-mp3-float-conf-he_48khz
-fate-mp3-float-conf-he_48khz: CMD = pcm -acodec mp3float -i 
$(TARGET_SAMPLES)/mp3-conformance/he_48khz.bit -af atrim=end_sample=171648
-fate-mp3-float-conf-he_48khz: REF = $(SAMPLES)/mp3-conformance/he_48khz.pcm
+fate-mp3-float-conf-he_48khz: CMD = avconv -acodec mp3float -i 
$(TARGET_SAMPLES)/mp3-conformance/he_48khz.bit -af atrim=end_sample=171648 -f 
f32le -
+fate-mp3-float-conf-he_48khz: REF = $(SAMPLES)/mp3-conformance/he_48khz.f32
 
 FATE_MP3 += fate-mp3-float-conf-hecommon
-fate-mp3-float-conf-hecommon: CMD = pcm -acodec mp3float -i 
$(TARGET_SAMPLES)/mp3-conformance/hecommon.bit -af atrim=end_sample=33408
-fate-mp3-float-conf-hecommon: REF = $(SAMPLES)/mp3-conformance/hecommon.pcm
+fate-mp3-float-conf-hecommon: CMD = avconv -acodec mp3float -i 
$(TARGET_SAMPLES)/mp3-conformance/hecommon.bit -af atrim=end_sample=33408 -f 
f32le -
+fate-mp3-float-conf-hecommon: REF = $(SAMPLES)/mp3-conformance/hecommon.f32
 
 FATE_MP3 += fate-mp3-float-conf-si
-fate-mp3-float-conf-si: CMD = pcm -acodec mp3float -i 
$(TARGET_SAMPLES)/mp3-conformance/si.bit -af atrim=end_sample=134784
-fate-mp3-float-conf-si: REF = $(SAMPLES)/mp3-conformance/si.pcm
+fate-mp3-float-conf-si: CMD = avconv -acodec mp3float -i 
$(TARGET_SAMPLES)/mp3-conformance/si.bit -af atrim=end_sample=134784 -f f32le -
+fate-mp3-float-conf-si: REF = $(SAMPLES)/mp3-conformance/si.f32
 
 FATE_MP3 += fate-mp3-float-conf-si_block
-fate-mp3-float-conf-si_block: CMD = pcm -acodec mp3float -i 
$(TARGET_SAMPLES)/mp3-conformance/si_block.bit -af atrim=end_sample=72576
-fate-mp3-float-conf-si_block: REF = $(SAMPLES)/mp3-conformance/si_block.pcm
+fate-mp3-float-conf-si_block: CMD = avconv -acodec mp3float -i 
$(TARGET_SAMPLES)/mp3-conformance/si_block.bit -af atrim=end_sample=72576 -f 
f32le -
+fate-mp3-float-conf-si_block: REF = $(SAMPLES)/mp3-conformance/si_block.f32
 
 FATE_MP3 += fate-mp3-float-extra_overread
-fate-mp3-float-extra_overread: CMD = pcm -c:a mp3float -i 
$(TARGET_SAMPLES)/mpegaudio/extra_overread.mp3
-fate-mp3-float-extra_overread: REF = $(SAMPLES)/mpegaudio/extra_overread.pcm
+fate-mp3-float-extra_overread: CMD = avconv -c:a mp3float -i 
$(TARGET_SAMPLES)/mpegaudio/extra_overread.mp3 -f f32le -
+fate-mp3-float-extra_overread: REF = $(SAMPLES)/mpegaudio/extra_overread.f32
 
-$(FATE_MP3): CMP = stddev
-$(FATE_MP3): FUZZ = 0.07
+$(FATE_MP3): CMP = oneoff
+$(FATE_MP3): CMP_UNIT = f32
+$(FATE_MP3): FUZZ = 17
 
 FATE_MP3-$(call DEMDEC, MP3, MP3FLOAT) += $(FATE_MP3)
 
-- 
2.0.0

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 0/20] removal of deprecated features

2015-07-29 Thread Kostya Shishkov
On Wed, Jul 29, 2015 at 09:07:53AM +0200, Anton Khirnov wrote:
 Quoting Kostya Shishkov (2015-07-29 08:59:42)
  On Wed, Jul 29, 2015 at 08:44:48AM +0200, Anton Khirnov wrote:
   Quoting Kostya Shishkov (2015-07-28 15:54:32)
On Tue, Jul 28, 2015 at 02:36:16PM +0100, Vittorio Giovara wrote:
 This set contains the removal of all deprecated features marked as
 such until 2012/early 2013. This was announced several times in the
 past months and agreed at several meetings (since fosdem and recently
 at the sprint).
 
 With more than two year span, downstream users should have had enough
 time to update their API usage (or comment otherwise).

I'd say swscale in general is a deprecated feature or should be one. 
And it's
your fault it's still not been replaced.
   
   I strongly suspect you could have written mountains of SIMD for avscale
   in the time it takes you to write these mails =p
  
  Maybe, there's just no point doing all that alone with no clear goal.
 
 Here's a clear goal:
 1) make avscale feature complete
 2) deprecate swscale
 3) ???
 4) profit

So far I like only step #3, avscale might happen but not in Libav.
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH] asfdec: prevent the memory leak while reading metadata

2015-07-29 Thread Alexandra Hájková
---
 libavformat/asfdec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 69c9ecb..46545b3 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -542,6 +542,7 @@ static void asf_store_aspect_ratio(AVFormatContext *s, 
uint8_t st_num, uint8_t *
 else
 asf-asf_sd[st_num].aspect_ratio.den = value;
 }
+av_freep(name);
 }
 
 static int asf_read_metadata_obj(AVFormatContext *s, const GUIDParseTable *g)
-- 
2.0.1

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 0/20] removal of deprecated features

2015-07-29 Thread Kostya Shishkov
On Wed, Jul 29, 2015 at 08:44:48AM +0200, Anton Khirnov wrote:
 Quoting Kostya Shishkov (2015-07-28 15:54:32)
  On Tue, Jul 28, 2015 at 02:36:16PM +0100, Vittorio Giovara wrote:
   This set contains the removal of all deprecated features marked as
   such until 2012/early 2013. This was announced several times in the
   past months and agreed at several meetings (since fosdem and recently
   at the sprint).
   
   With more than two year span, downstream users should have had enough
   time to update their API usage (or comment otherwise).
  
  I'd say swscale in general is a deprecated feature or should be one. And 
  it's
  your fault it's still not been replaced.
 
 I strongly suspect you could have written mountains of SIMD for avscale
 in the time it takes you to write these mails =p

Maybe, there's just no point doing all that alone with no clear goal.
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 0/20] removal of deprecated features

2015-07-29 Thread Anton Khirnov
Quoting Kostya Shishkov (2015-07-28 15:54:32)
 On Tue, Jul 28, 2015 at 02:36:16PM +0100, Vittorio Giovara wrote:
  This set contains the removal of all deprecated features marked as
  such until 2012/early 2013. This was announced several times in the
  past months and agreed at several meetings (since fosdem and recently
  at the sprint).
  
  With more than two year span, downstream users should have had enough
  time to update their API usage (or comment otherwise).
 
 I'd say swscale in general is a deprecated feature or should be one. And it's
 your fault it's still not been replaced.

I strongly suspect you could have written mountains of SIMD for avscale
in the time it takes you to write these mails =p

-- 
Anton Khirnov
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel