Re: [FFmpeg-devel] [PATCH 1/3] web/style.less: Styles for heading anchors

2014-12-05 Thread Michael Niedermayer
On Wed, Dec 03, 2014 at 09:31:33PM -0800, Timothy Gu wrote:
> Signed-off-by: Timothy Gu 
> ---
>  generate-doc.sh |  1 +
>  src/less/style.less | 12 
>  2 files changed, 13 insertions(+)

applied

thanks

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

There will always be a question for which you do not know the correct answer.


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 3/3] doc: html: Use native viewport

2014-12-05 Thread Michael Niedermayer
On Wed, Dec 03, 2014 at 09:31:35PM -0800, Timothy Gu wrote:
> Fixes displaying docs on small-screen devices.
> 
> Signed-off-by: Timothy Gu 
> ---
>  doc/t2h.pm | 1 +
>  1 file changed, 1 insertion(+)

applied

thanks

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/3] doc: Do not use the headings as links to TOC anchors

2014-12-05 Thread Michael Niedermayer
On Wed, Dec 03, 2014 at 09:31:34PM -0800, Timothy Gu wrote:
> Instead, use FontAwesome icons (if configured to be this way) or separate
> text.
> 
> Signed-off-by: Timothy Gu 
> ---
>  doc/t2h.pm | 104 
> +++--
>  1 file changed, 102 insertions(+), 2 deletions(-)

applied

thanks

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is what and why we do it that matters, not just one of them.


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat/hlsenc: added segment filename option

2014-12-05 Thread Michael Niedermayer
On Fri, Dec 05, 2014 at 09:20:15PM +, Christian Suloway wrote:
> Updating from previous message.
> 
> From: Christian Suloway 
> Sent: Friday, December 5, 2014 3:17 PM
> To: ffmpeg-devel@ffmpeg.org
> Cc: Christian Suloway
> Subject: [PATCH] avformat/hlsenc: added segment filename option
> 
> This option allows segment filenames to be specified. Unless -hls_flags
> single_file is set the filename is used as a string format with the
> segment number.
> 
> Example:
> ffmpeg -f lavfi -i testsrc -c:v h264 -map 0 -hls_segment_filename
> bar%03d.ts foo.m3u8

applied

thanks

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] doc: add loglevel numerical values

2014-12-05 Thread Michael Niedermayer
On Fri, Dec 05, 2014 at 12:36:18PM -0900, Lou Logan wrote:
> Signed-off-by: Lou Logan 
> ---
>  doc/fftools-common-opts.texi | 10 +-
>  1 file changed, 9 insertions(+), 1 deletion(-)

should be ok

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] lavc/options: fix leaks in avcodec_copy_context

2014-12-05 Thread Lukasz Marek

On 04.12.2014 23:51, Michael Niedermayer wrote:

On Thu, Dec 04, 2014 at 12:54:30AM +0100, Lukasz Marek wrote:

On 27.11.2014 04:17, Michael Niedermayer wrote:

On Thu, Nov 27, 2014 at 12:43:57AM +0100, Lukasz Marek wrote:

On 24.11.2014 05:16, Lukasz Marek wrote:

Signed-off-by: Lukasz Marek 
---
  libavcodec/options.c | 23 +++
  1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/libavcodec/options.c b/libavcodec/options.c
index 7f9fb07..8ba997c 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -190,6 +190,11 @@ int avcodec_copy_context(AVCodecContext *dest, const 
AVCodecContext *src)
  }

  av_opt_free(dest);
+av_freep(&dest->rc_override);
+av_freep(&dest->intra_matrix);
+av_freep(&dest->inter_matrix);
+av_freep(&dest->extradata);
+av_freep(&dest->subtitle_header);

  memcpy(dest, src, sizeof(*dest));
  av_opt_copy(dest, src);
@@ -205,13 +210,7 @@ int avcodec_copy_context(AVCodecContext *dest, const 
AVCodecContext *src)
  dest->slice_offset= NULL;
  dest->hwaccel = NULL;
  dest->internal= NULL;
-
-/* reallocate values that should be allocated separately */
-dest->extradata   = NULL;
-dest->intra_matrix= NULL;
-dest->inter_matrix= NULL;
-dest->rc_override = NULL;
-dest->subtitle_header = NULL;



This should stay. Updated version attched




  options.c |   16 +++-
  1 file changed, 11 insertions(+), 5 deletions(-)
971d1769e50d2e853d7359003f8c924092a96e6b  
0001-lavc-options-fix-leaks-in-avcodec_copy_context.patch
 From 722d7e837093212d6e6e6b17814ed408300d25a6 Mon Sep 17 00:00:00 2001
From: Lukasz Marek 
Date: Thu, 27 Nov 2014 00:41:16 +0100
Subject: [PATCH] lavc/options: fix leaks in avcodec_copy_context

Signed-off-by: Lukasz Marek 
---
  libavcodec/options.c | 16 +++-
  1 file changed, 11 insertions(+), 5 deletions(-)


breaks "make fate-lavf-yuv4mpeg"

--- ./tests/ref/lavf/yuv4mpeg   2014-11-26 20:04:48.466295490 +0100
+++ tests/data/fate/lavf-yuv4mpeg   2014-11-27 04:16:07.234916526 +0100
@@ -1,2 +0,0 @@
-ec8178cb152f9cdbfd9cb724d977db2e *./tests/data/lavf/lavf.y4m
-3801808 ./tests/data/lavf/lavf.y4m
Test lavf-yuv4mpeg failed. Look at tests/data/fate/lavf-yuv4mpeg.err for 
details.
make: *** [fate-lavf-yuv4mpeg] Error 139


I will rerun whole fate, but I assume I can push it if nothing fails?
The one mentioned above is OK.


ok


pushed

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavc/options: don't copy priv context when it is not AVOption object

2014-12-05 Thread Lukasz Marek

On 05.12.2014 00:15, Michael Niedermayer wrote:

On Thu, Dec 04, 2014 at 12:50:06AM +0100, Lukasz Marek wrote:

Subject: [PATCH] lavc/options: don't copy priv context when it is not AVOption
  object

This prevents potential crash when opt API is used without a class.


LGTM


Pushed
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] doc: add loglevel numerical values

2014-12-05 Thread Lou Logan
On Fri,  5 Dec 2014 12:36:18 -0900, Lou Logan wrote:

> Signed-off-by: Lou Logan 
> ---

Useful for setting FFREPORT.

>  doc/fftools-common-opts.texi | 10 +-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/doc/fftools-common-opts.texi b/doc/fftools-common-opts.texi
> index 0e8f849..c496419 100644
> --- a/doc/fftools-common-opts.texi
> +++ b/doc/fftools-common-opts.texi
> @@ -165,27 +165,35 @@ omitted. "repeat" can also be used alone.
>  If "repeat" is used alone, and with no prior loglevel set, the default
>  loglevel will be used. If multiple loglevel parameters are given, using
>  'repeat' will not change the loglevel.
> -@var{loglevel} is a number or a string containing one of the following 
> values:
> +@var{loglevel} is a a string or a number containing one of the following 
> values:

The "a a" typo fixed locally.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] doc: add loglevel numerical values

2014-12-05 Thread Lou Logan
Signed-off-by: Lou Logan 
---
 doc/fftools-common-opts.texi | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/doc/fftools-common-opts.texi b/doc/fftools-common-opts.texi
index 0e8f849..c496419 100644
--- a/doc/fftools-common-opts.texi
+++ b/doc/fftools-common-opts.texi
@@ -165,27 +165,35 @@ omitted. "repeat" can also be used alone.
 If "repeat" is used alone, and with no prior loglevel set, the default
 loglevel will be used. If multiple loglevel parameters are given, using
 'repeat' will not change the loglevel.
-@var{loglevel} is a number or a string containing one of the following values:
+@var{loglevel} is a a string or a number containing one of the following 
values:
 @table @samp
 @item quiet
+@item -8
 Show nothing at all; be silent.
 @item panic
+@item 0
 Only show fatal errors which could lead the process to crash, such as
 and assert failure. This is not currently used for anything.
 @item fatal
+@item 8
 Only show fatal errors. These are errors after which the process absolutely
 cannot continue after.
 @item error
+@item 16
 Show all errors, including ones which can be recovered from.
 @item warning
+@item 24
 Show all warnings and errors. Any message related to possibly
 incorrect or unexpected events will be shown.
 @item info
+@item 32
 Show informative messages during processing. This is in addition to
 warnings and errors. This is the default value.
 @item verbose
+@item 40
 Same as @code{info}, except more verbose.
 @item debug
+@item 48
 Show everything, including debugging information.
 @end table
 
-- 
2.1.3

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat/hlsenc: added segment filename option

2014-12-05 Thread Christian Suloway
Updating from previous message.

From: Christian Suloway 
Sent: Friday, December 5, 2014 3:17 PM
To: ffmpeg-devel@ffmpeg.org
Cc: Christian Suloway
Subject: [PATCH] avformat/hlsenc: added segment filename option

This option allows segment filenames to be specified. Unless -hls_flags
single_file is set the filename is used as a string format with the
segment number.

Example:
ffmpeg -f lavfi -i testsrc -c:v h264 -map 0 -hls_segment_filename
bar%03d.ts foo.m3u8

Signed-off-by: Christian Suloway 
---
 doc/muxers.texi  |  9 +
 libavformat/hlsenc.c | 40 
 2 files changed, 33 insertions(+), 16 deletions(-)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index c6ba604..34e827c 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -254,6 +254,15 @@ and it is not to be confused with the segment filename 
sequence number
 which can be cyclic, for example if the @option{wrap} option is
 specified.

+@item hls_segment_filename @var{filename}
+Set the segment filename. Unless hls_flags single_file is set @var{filename}
+is used as a string format with the segment number:
+@example
+ffmpeg in.nut -hls_segment_filename 'file%03d.ts' out.m3u8
+@end example
+This example will produce the playlist, @file{out.m3u8}, and segment files:
+@file{file000.ts}, @file{file001.ts}, @file{file002.ts}, etc.
+
 @item hls_flags single_file
 If this flag is set, the muxer will store all segments in a single MPEG-TS
 file, and will use byte ranges in the playlist. HLS playlists generated with
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index e13f438..d5ea990 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -59,6 +59,7 @@ typedef struct HLSContext {
 int max_nb_segments;   // Set by a private option.
 int  wrap; // Set by a private option.
 uint32_t flags;// enum HLSFlags
+char *segment_filename;

 int allowcache;
 int64_t recording_time;
@@ -237,15 +238,12 @@ static int hls_write_header(AVFormatContext *s)
 char *p;
 const char *pattern = "%d.ts";
 AVDictionary *options = NULL;
-int basename_size = strlen(s->filename) + strlen(pattern) + 1;
+int basename_size;

 hls->sequence   = hls->start_sequence;
 hls->recording_time = hls->time * AV_TIME_BASE;
 hls->start_pts  = AV_NOPTS_VALUE;

-if (hls->flags & HLS_SINGLE_FILE)
-pattern = ".ts";
-
 if (hls->format_options_str) {
 ret = av_dict_parse_string(&hls->format_options, 
hls->format_options_str, "=", ":", 0);
 if (ret < 0) {
@@ -270,21 +268,30 @@ static int hls_write_header(AVFormatContext *s)
 goto fail;
 }

-hls->basename = av_malloc(basename_size);
-
-if (!hls->basename) {
-ret = AVERROR(ENOMEM);
-goto fail;
-}
-
-strcpy(hls->basename, s->filename);
+if (hls->segment_filename) {
+hls->basename = av_strdup(hls->segment_filename);
+if (!hls->basename) {
+ret = AVERROR(ENOMEM);
+goto fail;
+}
+} else {
+if (hls->flags & HLS_SINGLE_FILE)
+pattern = ".ts";

-p = strrchr(hls->basename, '.');
+basename_size = strlen(s->filename) + strlen(pattern) + 1;
+hls->basename = av_malloc(basename_size);
+if (!hls->basename) {
+ret = AVERROR(ENOMEM);
+goto fail;
+}

-if (p)
-*p = '\0';
+av_strlcpy(hls->basename, s->filename, basename_size);

-av_strlcat(hls->basename, pattern, basename_size);
+p = strrchr(hls->basename, '.');
+if (p)
+*p = '\0';
+av_strlcat(hls->basename, pattern, basename_size);
+}

 if ((ret = hls_mux_init(s)) < 0)
 goto fail;
@@ -410,6 +417,7 @@ static const AVOption options[] = {
 {"hls_wrap",  "set number after which the index wraps",  OFFSET(wrap), 
   AV_OPT_TYPE_INT,{.i64 = 0}, 0, INT_MAX, E},
 {"hls_allow_cache", "explicitly set whether the client MAY (1) or MUST NOT 
(0) cache media segments", OFFSET(allowcache), AV_OPT_TYPE_INT, {.i64 = -1}, 
INT_MIN, INT_MAX, E},
 {"hls_base_url",  "url to prepend to each playlist entry",   
OFFSET(baseurl), AV_OPT_TYPE_STRING, {.str = NULL},  0, 0,   E},
+{"hls_segment_filename", "filename template for segment files", 
OFFSET(segment_filename),   AV_OPT_TYPE_STRING, {.str = NULL},0,
   0, E},
 {"hls_flags", "set flags affecting HLS playlist and media file 
generation", OFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = 0 }, 0, UINT_MAX, E, 
"flags"},
 {"single_file",   "generate a single media file indexed with byte ranges", 
0, AV_OPT_TYPE_CONST, {.i64 = HLS_SINGLE_FILE }, 0, UINT_MAX,   E, "flags"},

--
1.9.3 (Apple Git-50)

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avformat/hlsenc: added segment filename option

2014-12-05 Thread Christian Suloway
This option allows segment filenames to be specified. Unless -hls_flags
single_file is set the filename is used as a string format with the
segment number.

Example:
ffmpeg -f lavfi -i testsrc -c:v h264 -map 0 -hls_segment_filename
bar%03d.ts foo.m3u8

Signed-off-by: Christian Suloway 
---
 doc/muxers.texi  |  9 +
 libavformat/hlsenc.c | 40 
 2 files changed, 33 insertions(+), 16 deletions(-)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index c6ba604..34e827c 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -254,6 +254,15 @@ and it is not to be confused with the segment filename 
sequence number
 which can be cyclic, for example if the @option{wrap} option is
 specified.
 
+@item hls_segment_filename @var{filename}
+Set the segment filename. Unless hls_flags single_file is set @var{filename}
+is used as a string format with the segment number:
+@example
+ffmpeg in.nut -hls_segment_filename 'file%03d.ts' out.m3u8
+@end example
+This example will produce the playlist, @file{out.m3u8}, and segment files:
+@file{file000.ts}, @file{file001.ts}, @file{file002.ts}, etc.
+
 @item hls_flags single_file
 If this flag is set, the muxer will store all segments in a single MPEG-TS
 file, and will use byte ranges in the playlist. HLS playlists generated with
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index e13f438..d5ea990 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -59,6 +59,7 @@ typedef struct HLSContext {
 int max_nb_segments;   // Set by a private option.
 int  wrap; // Set by a private option.
 uint32_t flags;// enum HLSFlags
+char *segment_filename;
 
 int allowcache;
 int64_t recording_time;
@@ -237,15 +238,12 @@ static int hls_write_header(AVFormatContext *s)
 char *p;
 const char *pattern = "%d.ts";
 AVDictionary *options = NULL;
-int basename_size = strlen(s->filename) + strlen(pattern) + 1;
+int basename_size;
 
 hls->sequence   = hls->start_sequence;
 hls->recording_time = hls->time * AV_TIME_BASE;
 hls->start_pts  = AV_NOPTS_VALUE;
 
-if (hls->flags & HLS_SINGLE_FILE)
-pattern = ".ts";
-
 if (hls->format_options_str) {
 ret = av_dict_parse_string(&hls->format_options, 
hls->format_options_str, "=", ":", 0);
 if (ret < 0) {
@@ -270,21 +268,30 @@ static int hls_write_header(AVFormatContext *s)
 goto fail;
 }
 
-hls->basename = av_malloc(basename_size);
-
-if (!hls->basename) {
-ret = AVERROR(ENOMEM);
-goto fail;
-}
-
-strcpy(hls->basename, s->filename);
+if (hls->segment_filename) {
+hls->basename = av_strdup(hls->segment_filename);
+if (!hls->basename) {
+ret = AVERROR(ENOMEM);
+goto fail;
+}
+} else {
+if (hls->flags & HLS_SINGLE_FILE)
+pattern = ".ts";
 
-p = strrchr(hls->basename, '.');
+basename_size = strlen(s->filename) + strlen(pattern) + 1;
+hls->basename = av_malloc(basename_size);
+if (!hls->basename) {
+ret = AVERROR(ENOMEM);
+goto fail;
+}
 
-if (p)
-*p = '\0';
+av_strlcpy(hls->basename, s->filename, basename_size);
 
-av_strlcat(hls->basename, pattern, basename_size);
+p = strrchr(hls->basename, '.');
+if (p)
+*p = '\0';
+av_strlcat(hls->basename, pattern, basename_size);
+}
 
 if ((ret = hls_mux_init(s)) < 0)
 goto fail;
@@ -410,6 +417,7 @@ static const AVOption options[] = {
 {"hls_wrap",  "set number after which the index wraps",  OFFSET(wrap), 
   AV_OPT_TYPE_INT,{.i64 = 0}, 0, INT_MAX, E},
 {"hls_allow_cache", "explicitly set whether the client MAY (1) or MUST NOT 
(0) cache media segments", OFFSET(allowcache), AV_OPT_TYPE_INT, {.i64 = -1}, 
INT_MIN, INT_MAX, E},
 {"hls_base_url",  "url to prepend to each playlist entry",   
OFFSET(baseurl), AV_OPT_TYPE_STRING, {.str = NULL},  0, 0,   E},
+{"hls_segment_filename", "filename template for segment files", 
OFFSET(segment_filename),   AV_OPT_TYPE_STRING, {.str = NULL},0,
   0, E},
 {"hls_flags", "set flags affecting HLS playlist and media file 
generation", OFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = 0 }, 0, UINT_MAX, E, 
"flags"},
 {"single_file",   "generate a single media file indexed with byte ranges", 
0, AV_OPT_TYPE_CONST, {.i64 = HLS_SINGLE_FILE }, 0, UINT_MAX,   E, "flags"},
 
-- 
1.9.3 (Apple Git-50)

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avformat/hlsenc: added segment filename option

2014-12-05 Thread Christian Suloway
This option allows segment filenames to be specified. Unless -hls_flags
single_file is set the filename is used as a string format with the
segment number.

Example:
ffmpeg -f lavfi -i testsrc -c:v h264 -map 0 -hls_segment_filename
bar%03d.ts foo.m3u8

Signed-off-by: Christian Suloway 
---
 doc/muxers.texi  |  9 +
 libavformat/hlsenc.c | 40 
 2 files changed, 33 insertions(+), 16 deletions(-)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index c6ba604..34e827c 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -254,6 +254,15 @@ and it is not to be confused with the segment filename 
sequence number
 which can be cyclic, for example if the @option{wrap} option is
 specified.
 
+@item hls_segment_filename @var{filename}
+Set the segment filename. Unless hls_flags single_file is set @var{filename}
+is used as a string format with the segment number:
+@example
+ffmpeg in.nut -hls_segment_filename 'file%03d.ts' out.m3u8
+@end example
+This example will produce the playlist, @file{out.m3u8}, and segment files:
+@file{file000.ts}, @file{file001.ts}, @file{file002.ts}, etc.
+
 @item hls_flags single_file
 If this flag is set, the muxer will store all segments in a single MPEG-TS
 file, and will use byte ranges in the playlist. HLS playlists generated with
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index e13f438..786c6b4 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -59,6 +59,7 @@ typedef struct HLSContext {
 int max_nb_segments;   // Set by a private option.
 int  wrap; // Set by a private option.
 uint32_t flags;// enum HLSFlags
+char *segment_filename;
 
 int allowcache;
 int64_t recording_time;
@@ -237,15 +238,12 @@ static int hls_write_header(AVFormatContext *s)
 char *p;
 const char *pattern = "%d.ts";
 AVDictionary *options = NULL;
-int basename_size = strlen(s->filename) + strlen(pattern) + 1;
+int basename_size;
 
 hls->sequence   = hls->start_sequence;
 hls->recording_time = hls->time * AV_TIME_BASE;
 hls->start_pts  = AV_NOPTS_VALUE;
 
-if (hls->flags & HLS_SINGLE_FILE)
-pattern = ".ts";
-
 if (hls->format_options_str) {
 ret = av_dict_parse_string(&hls->format_options, 
hls->format_options_str, "=", ":", 0);
 if (ret < 0) {
@@ -270,21 +268,30 @@ static int hls_write_header(AVFormatContext *s)
 goto fail;
 }
 
-hls->basename = av_malloc(basename_size);
-
-if (!hls->basename) {
-ret = AVERROR(ENOMEM);
-goto fail;
-}
-
-strcpy(hls->basename, s->filename);
+if (hls->segment_filename) {
+hls->basename = av_strdup(av_basename(hls->segment_filename));
+if (!hls->basename) {
+ret = AVERROR(ENOMEM);
+goto fail;
+}
+} else {
+if (hls->flags & HLS_SINGLE_FILE)
+pattern = ".ts";
 
-p = strrchr(hls->basename, '.');
+basename_size = strlen(s->filename) + strlen(pattern) + 1;
+hls->basename = av_malloc(basename_size);
+if (!hls->basename) {
+ret = AVERROR(ENOMEM);
+goto fail;
+}
 
-if (p)
-*p = '\0';
+av_strlcpy(hls->basename, s->filename, basename_size);
 
-av_strlcat(hls->basename, pattern, basename_size);
+p = strrchr(hls->basename, '.');
+if (p)
+*p = '\0';
+av_strlcat(hls->basename, pattern, basename_size);
+}
 
 if ((ret = hls_mux_init(s)) < 0)
 goto fail;
@@ -410,6 +417,7 @@ static const AVOption options[] = {
 {"hls_wrap",  "set number after which the index wraps",  OFFSET(wrap), 
   AV_OPT_TYPE_INT,{.i64 = 0}, 0, INT_MAX, E},
 {"hls_allow_cache", "explicitly set whether the client MAY (1) or MUST NOT 
(0) cache media segments", OFFSET(allowcache), AV_OPT_TYPE_INT, {.i64 = -1}, 
INT_MIN, INT_MAX, E},
 {"hls_base_url",  "url to prepend to each playlist entry",   
OFFSET(baseurl), AV_OPT_TYPE_STRING, {.str = NULL},  0, 0,   E},
+{"hls_segment_filename", "filename template for segment files", 
OFFSET(segment_filename),   AV_OPT_TYPE_STRING, {.str = NULL},0,
   0, E},
 {"hls_flags", "set flags affecting HLS playlist and media file 
generation", OFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = 0 }, 0, UINT_MAX, E, 
"flags"},
 {"single_file",   "generate a single media file indexed with byte ranges", 
0, AV_OPT_TYPE_CONST, {.i64 = HLS_SINGLE_FILE }, 0, UINT_MAX,   E, "flags"},
 
-- 
1.9.3 (Apple Git-50)

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat/hlsenc: added segment filename option

2014-12-05 Thread Michael Niedermayer
On Fri, Dec 05, 2014 at 11:06:19AM -0600, Christian Suloway wrote:
> This option allows segment filenames to be specified. Unless -hls_flags
> single_file is enabled the filename is used as a string format with the
> segment number.
> 
> Example:
> ffmpeg -f lavfi -i testsrc -c:v h264 -map 0 -hls_segment_filename
> bar%03d.ts foo.m3u8
> 
> Signed-off-by: Christian Suloway `
> ---
>  libavformat/hlsenc.c | 46 ++
>  1 file changed, 30 insertions(+), 16 deletions(-)

missing update to doc/muxers.texi

also it doesnt work when the hls_segment_filename
is not in the current directory, aka no path can be specified

./ffmpeg -f lavfi -i testsrc -c:v h264 -map 0 -hls_segment_filename 
/tmp/bar%03d.ts  foo.m3u8
fails with invalid segment filename /tmp/bar%03d.ts

[...]
> @@ -270,21 +268,36 @@ static int hls_write_header(AVFormatContext *s)
>  goto fail;
>  }
>  
> -hls->basename = av_malloc(basename_size);
> -
> -if (!hls->basename) {
> -ret = AVERROR(ENOMEM);
> -goto fail;
> -}
> -
> -strcpy(hls->basename, s->filename);
> +if (hls->segment_filename) {
> +hls->basename = av_strdup(av_basename(hls->segment_filename));
> +if (!hls->basename) {
> +ret = AVERROR(ENOMEM);
> +goto fail;
> +}
> +if (strlen(hls->basename) != strlen(hls->segment_filename)) {
> +av_log(hls, AV_LOG_ERROR, "invalid segment filename %s\n",
> +  hls->segment_filename);
> +ret = AVERROR(EINVAL);
> +goto fail;
> +}
> +} else {
> +if (hls->flags & HLS_SINGLE_FILE)
> +pattern = ".ts";
>  
> -p = strrchr(hls->basename, '.');
> +basename_size = strlen(s->filename) + strlen(pattern) + 1;
> +hls->basename = av_malloc(basename_size);
> +if (!hls->basename) {
> +ret = AVERROR(ENOMEM);
> +goto fail;
> +}
>  
> -if (p)
> -*p = '\0';

> +strlcpy(hls->basename, s->filename, basename_size);

av_strlcpy

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avformat/hlsenc: added segment filename option

2014-12-05 Thread Christian Suloway
This option allows segment filenames to be specified. Unless -hls_flags
single_file is enabled the filename is used as a string format with the
segment number.

Example:
ffmpeg -f lavfi -i testsrc -c:v h264 -map 0 -hls_segment_filename
bar%03d.ts foo.m3u8

Signed-off-by: Christian Suloway `
---
 libavformat/hlsenc.c | 46 ++
 1 file changed, 30 insertions(+), 16 deletions(-)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index e13f438..59392c5 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -59,6 +59,7 @@ typedef struct HLSContext {
 int max_nb_segments;   // Set by a private option.
 int  wrap; // Set by a private option.
 uint32_t flags;// enum HLSFlags
+char *segment_filename;
 
 int allowcache;
 int64_t recording_time;
@@ -237,15 +238,12 @@ static int hls_write_header(AVFormatContext *s)
 char *p;
 const char *pattern = "%d.ts";
 AVDictionary *options = NULL;
-int basename_size = strlen(s->filename) + strlen(pattern) + 1;
+int basename_size;
 
 hls->sequence   = hls->start_sequence;
 hls->recording_time = hls->time * AV_TIME_BASE;
 hls->start_pts  = AV_NOPTS_VALUE;
 
-if (hls->flags & HLS_SINGLE_FILE)
-pattern = ".ts";
-
 if (hls->format_options_str) {
 ret = av_dict_parse_string(&hls->format_options, 
hls->format_options_str, "=", ":", 0);
 if (ret < 0) {
@@ -270,21 +268,36 @@ static int hls_write_header(AVFormatContext *s)
 goto fail;
 }
 
-hls->basename = av_malloc(basename_size);
-
-if (!hls->basename) {
-ret = AVERROR(ENOMEM);
-goto fail;
-}
-
-strcpy(hls->basename, s->filename);
+if (hls->segment_filename) {
+hls->basename = av_strdup(av_basename(hls->segment_filename));
+if (!hls->basename) {
+ret = AVERROR(ENOMEM);
+goto fail;
+}
+if (strlen(hls->basename) != strlen(hls->segment_filename)) {
+av_log(hls, AV_LOG_ERROR, "invalid segment filename %s\n",
+  hls->segment_filename);
+ret = AVERROR(EINVAL);
+goto fail;
+}
+} else {
+if (hls->flags & HLS_SINGLE_FILE)
+pattern = ".ts";
 
-p = strrchr(hls->basename, '.');
+basename_size = strlen(s->filename) + strlen(pattern) + 1;
+hls->basename = av_malloc(basename_size);
+if (!hls->basename) {
+ret = AVERROR(ENOMEM);
+goto fail;
+}
 
-if (p)
-*p = '\0';
+strlcpy(hls->basename, s->filename, basename_size);
 
-av_strlcat(hls->basename, pattern, basename_size);
+p = strrchr(hls->basename, '.');
+if (p)
+*p = '\0';
+av_strlcat(hls->basename, pattern, basename_size);
+}
 
 if ((ret = hls_mux_init(s)) < 0)
 goto fail;
@@ -412,6 +425,7 @@ static const AVOption options[] = {
 {"hls_base_url",  "url to prepend to each playlist entry",   
OFFSET(baseurl), AV_OPT_TYPE_STRING, {.str = NULL},  0, 0,   E},
 {"hls_flags", "set flags affecting HLS playlist and media file 
generation", OFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = 0 }, 0, UINT_MAX, E, 
"flags"},
 {"single_file",   "generate a single media file indexed with byte ranges", 
0, AV_OPT_TYPE_CONST, {.i64 = HLS_SINGLE_FILE }, 0, UINT_MAX,   E, "flags"},
+{"hls_segment_filename", "filename template for segment files", 
OFFSET(segment_filename),   AV_OPT_TYPE_STRING, {.str = NULL},0,
   0, E},
 
 { NULL },
 };
-- 
1.9.3 (Apple Git-50)

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] swr: allow passing of AVFrame.data to swr_convert without, cast in C++ code

2014-12-05 Thread Michael Niedermayer
On Fri, Dec 05, 2014 at 03:18:15PM +0100, wm4 wrote:
> On Fri, 5 Dec 2014 14:15:03 +0100
> Michael Niedermayer  wrote:
> 
> > On Fri, Dec 05, 2014 at 04:14:53PM +0800, Yu Xiaolei wrote:
> > > 
> > > ---
> > >  libswresample/swresample.c | 4 ++--
> > >  libswresample/swresample.h | 4 ++--
> > >  2 files changed, 4 insertions(+), 4 deletions(-)
> > 
> > This adds these warnings:
> > 
> > ibswresample/swresample.c:380:13: note: expected ‘uint8_t **’ but argument 
> > is of type ‘uint8_t * const*’
> > libswresample/swresample.c:693:5: warning: passing argument 2 of 
> > ‘fill_audiodata’ discards ‘const’ qualifier from pointer target type 
> > [enabled by default]
> > 
> > also adding const breaks API sadly so it must be delayed until
> > the next major version bump see:
> > f00e9c4b10f5ab7cd382d3019eb7bee13fcc3866 for an example on how to
> > do that
> > 
> > [...]
> 
> Also, it would be much easier to use if const wasn't used at all.
> 
> Additionally, uint8_t is a pretty bad choice. uint8_t doesn't need to
> have the same propery as char in that it can alias anything, even if
> many C implementations end up typedefing uint8_t to (unsigned) char.
> Maybe change it to void*?

void is awkward as you cannot add a offset to it also you loose the
bit of type checking thats there when theres no cast

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

What does censorship reveal? It reveals fear. -- Julian Assange


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] doc/examples/filtering_video: fix frame rate

2014-12-05 Thread Michael Niedermayer
On Fri, Dec 05, 2014 at 03:52:23PM +0100, Piotr Fusik wrote:
> Hello,
> 
> I'm new to ffmpeg. I've started learning it by playing with the 
> filtering_video example.
> 
> I've noticed that for some mp4 files it plays with an incorrect frame rate:
> for some files it's twice too fast and for other files the delays are 
> completely skipped
> because the calculated delay values are too large.
> I can provide sample movies if needed.
> 
> I managed to correct the frame rate by setting time_base the way
> the other example, filtering_audio, does it. Please review my patch.
> 
> Thank you,
> Piotr

>  filtering_video.c |3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 7a169d049a37bc28601cf69026746bf7d0dd43d1  
> 0001-doc-examples-filtering_video-fix-frame-rate.patch
> From abd439d9f845d0057c562a82aa97a7f3a22cfc94 Mon Sep 17 00:00:00 2001
> From: Piotr Fusik 
> Date: Fri, 5 Dec 2014 15:47:05 +0100
> Subject: [PATCH] doc/examples/filtering_video: fix frame rate

applied

thanks

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The educated differ from the uneducated as much as the living from the
dead. -- Aristotle 


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Fixed PNG decoding with Paeth filter for RGBA 64-bits.

2014-12-05 Thread Dominique Leroux
Hi Cristophe,

Before submitting yesterday evening, I pulled the latest changes from master 
and the problem is still present.

My situation happens with RGBA64.  The structure of the existing C code was 
meant to enter the optimized path with a buffer size that is compatible with 
SIMD constraints.  So I just generalized the buffer resizing so it takes any 
bpp into account (and not just bpp=3 or bpp=4 like before).

Here are sample files that are 4 lines long: the original and the corrupted 
output.  The corruption is on the rightmost edge, where last 3 lines have the 
expected pink replaced by yellow.

With my fix, the resulting output is as as the original.  The resulting file 
layout differs, however: the original has one single IDAT chunk for all 4 
lines, whereas the output files have one IDAT chunk per line (hence the bigger 
size).  Maybe this is part of the reason it went unnoticed for so long as I 
don't think it is possible to generate such a png file with ffmpeg and the 
corruption does not happen on the first line.

Thanks for looking at this,

Dominique

-Original Message-
From: ffmpeg-devel-boun...@ffmpeg.org [mailto:ffmpeg-devel-boun...@ffmpeg.org] 
On Behalf Of Christophe Gisquet
Sent: Friday, December 05, 2014 4:30 AM
To: FFmpeg development discussions and patches
Subject: Re: [FFmpeg-devel] [PATCH] Fixed PNG decoding with Paeth filter for 
RGBA 64-bits.

Hi,

2014-12-05 1:20 GMT+01:00 Dominique Leroux :
> Found and fixed an artifact in the last column of decoded RGBA 64-bits PNG 
> images.
>
> The code was dealing with a SIMD-optimized version of the function without 
> taking into account that we can have RGB/RGBA images that are respectively 6 
> or 8  bytes per pixel (not just 3 or 4).

First, what version are you working on? Ronald included a fix in 
http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=af79a0c48a41fd99b674b39ac509ae442974715d
that would then be incomplete?

If true, then it probably means we don't have a "fate" test for it (ie a means 
to validate ffmpeg's output against a known "good"
checksum/behaviour), or that it is unaffected by the bug.

In any case, could you share a sample file exhibiting the issue? I guess 
cropping to the last few lines would be fine from a quick glance at your patch. 
But I haven't studied the issue to actually validate it.

Thank you,
--
Christophe
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat/mpegts: fix Opus stream count

2014-12-05 Thread Michael Niedermayer
On Fri, Dec 05, 2014 at 02:33:58PM +0100, Rafaël Carré wrote:
> That number represents the number of streams, not the number of channels
> ---
>  libavformat/mpegts.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

applied

thanks

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Frequently ignored answer#1 FFmpeg bugs should be sent to our bugtracker. User
questions about the command line tools should be sent to the ffmpeg-user ML.
And questions about how to use libav* should be sent to the libav-user ML.


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] doc/examples/filtering_video: fix frame rate

2014-12-05 Thread Piotr Fusik
Hello,

I'm new to ffmpeg. I've started learning it by playing with the 
filtering_video example.

I've noticed that for some mp4 files it plays with an incorrect frame rate:
for some files it's twice too fast and for other files the delays are 
completely skipped
because the calculated delay values are too large.
I can provide sample movies if needed.

I managed to correct the frame rate by setting time_base the way
the other example, filtering_audio, does it. Please review my patch.

Thank you,
Piotr

0001-doc-examples-filtering_video-fix-frame-rate.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] Adding closed caption decoder

2014-12-05 Thread Nicolas George
Hi. I had time to look at the code with some more details. Comments are
below.

> >From 31f69ccfb45247a7cc203084a931b8523284aa13 Mon Sep 17 00:00:00 2001
> From: Anshul Maheshwari 
> Date: Wed, 3 Dec 2014 23:37:22 +0530
> Subject: [PATCH 2/2] Adding Closed caption Decoder
> 
> ---
>  libavcodec/Makefile   |   1 +
>  libavcodec/allcodecs.c|   1 +
>  libavcodec/ccaption_dec.c | 318 
> ++
>  3 files changed, 320 insertions(+)
>  create mode 100644 libavcodec/ccaption_dec.c
> 
> diff --git a/libavcodec/Makefile b/libavcodec/Makefile
> index fa0f53d..bbc516d 100644
> --- a/libavcodec/Makefile
> +++ b/libavcodec/Makefile
> @@ -173,6 +173,7 @@ OBJS-$(CONFIG_BRENDER_PIX_DECODER) += brenderpix.o
>  OBJS-$(CONFIG_C93_DECODER) += c93.o
>  OBJS-$(CONFIG_CAVS_DECODER)+= cavs.o cavsdec.o cavsdsp.o \
>cavsdata.o mpeg12data.o
> +OBJS-$(CONFIG_CCAPTION_DECODER)+= ccaption_dec.o
>  OBJS-$(CONFIG_CDGRAPHICS_DECODER)  += cdgraphics.o
>  OBJS-$(CONFIG_CDXL_DECODER)+= cdxl.o
>  OBJS-$(CONFIG_CINEPAK_DECODER) += cinepak.o
> diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
> index 0d39d33..8c07388 100644
> --- a/libavcodec/allcodecs.c
> +++ b/libavcodec/allcodecs.c
> @@ -480,6 +480,7 @@ void avcodec_register_all(void)
>  /* subtitles */
>  REGISTER_ENCDEC (SSA,   ssa);
>  REGISTER_ENCDEC (ASS,   ass);
> +REGISTER_DECODER(CCAPTION,  ccaption);
>  REGISTER_ENCDEC (DVBSUB,dvbsub);
>  REGISTER_ENCDEC (DVDSUB,dvdsub);
>  REGISTER_DECODER(JACOSUB,   jacosub);
> diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c
> new file mode 100644
> index 000..0a7dfd8
> --- /dev/null
> +++ b/libavcodec/ccaption_dec.c
> @@ -0,0 +1,318 @@
> +/*
> + * Closed Caption Decoding
> + * Copyright (c) 2014 Anshul Maheshwari
> + *
> + * This file is part of FFmpeg.
> + *
> + * FFmpeg is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * FFmpeg is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with FFmpeg; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
> USA
> + */
> +
> +#include "avcodec.h"
> +#include "ass.h"
> +
> +#define SCREEN_ROWS 15
> +#define SCREEN_COLUMNS 32
> +
> +#define SET_FLAG(var, val) ( var |= ( 1 << (val) ) )
> +#define UNSET_FLAG(var, val) ( var &=  ~( 1 << (val)) )
> +#define CHECK_FLAG(var, val) ( (var) & (1 << (val) ) )
> +
> +enum cc_mode {
> +CCMODE_POPON,
> +CCMODE_PAINTON,
> +CCMODE_ROLLUP_2,
> +CCMODE_ROLLUP_3,
> +CCMODE_ROLLUP_4,
> +CCMODE_TEXT,
> +};
> +
> +struct Screen {

> +uint8_t characters[SCREEN_ROWS][SCREEN_COLUMNS+1];

Maybe add a comment about the +1?

> +/*

> + * row used flag will be 0 when none in use other wise it will have its
> + * corrosponding bit high.

Language nit. I suggest: "Bitmask of used rows; if a bit is not set, the
corresponding row is not used."

> + * for setting row 1  use row | (1 >> 1)
> + * for setting row 15 use row | (1 >> 15)

Are you sure that is ">>" and not "<<"? And is it a good idea to number
starting from 1?

> + */
> +int16_t  row_used;
> +};
> +
> +
> +typedef struct CCaptionSubContext {
> +int parity_table[256];
> +int row_cnt;
> +struct Screen screen[2];
> +int active_screen;
> +int cursor_row;
> +int cursor_column;
> +AVBPrint buffer;

> +/* erase display memory */
> +int edm;

It is used only a handful of times: I suggest a more meaningful name instead
of a comment: "erase_disp_mem" for example.

> +int rollup;
> +enum  cc_mode mode;
> +int64_t start_time;
> +/* visible screen time */

> +int64_t startv_time;

Is the v a typo?

> +int64_t end_time;

> +char prev_cmd[2];

The code uses various types for these values: char, unsigned char, uint8_t.
I suggest to stick with uint8_t if it works.

> +}CCaptionSubContext;
> +
> +static void build_parity_table(int *parity_table)
> +{

> +unsigned int byte;

Inconsistent indentation.

> +int parity_v;
> +for (byte = 0; byte <= 127; byte++) {

> +parity_v = av_popcount(byte & 0x7f) & 1;

The & 0x7f is redundant.

> +parity_table[byte] = parity_v;
> +parity_table[byte | 0x80] = !parity_v;
> +}
> +}
> +
> +stat

Re: [FFmpeg-devel] [PATCH] swr: allow passing of AVFrame.data to swr_convert without, cast in C++ code

2014-12-05 Thread wm4
On Fri, 5 Dec 2014 14:15:03 +0100
Michael Niedermayer  wrote:

> On Fri, Dec 05, 2014 at 04:14:53PM +0800, Yu Xiaolei wrote:
> > 
> > ---
> >  libswresample/swresample.c | 4 ++--
> >  libswresample/swresample.h | 4 ++--
> >  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> This adds these warnings:
> 
> ibswresample/swresample.c:380:13: note: expected ‘uint8_t **’ but argument is 
> of type ‘uint8_t * const*’
> libswresample/swresample.c:693:5: warning: passing argument 2 of 
> ‘fill_audiodata’ discards ‘const’ qualifier from pointer target type [enabled 
> by default]
> 
> also adding const breaks API sadly so it must be delayed until
> the next major version bump see:
> f00e9c4b10f5ab7cd382d3019eb7bee13fcc3866 for an example on how to
> do that
> 
> [...]

Also, it would be much easier to use if const wasn't used at all.

Additionally, uint8_t is a pretty bad choice. uint8_t doesn't need to
have the same propery as char in that it can alias anything, even if
many C implementations end up typedefing uint8_t to (unsigned) char.
Maybe change it to void*?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] FFmpeg in Microsoft Media Foudation

2014-12-05 Thread compn
On Fri, 5 Dec 2014 03:45:47 +
Jesse Jiang  wrote:

> Is there any open-source project which using ffmpeg in MFT(Microsoft
> Media Foundation). I know there is Lav project for DShow. So is there
> any plant to move to MFT.

it would be a good idea, i dont know of any project yet.
did you ask the ffdshow-tryouts project? or maybe also on doom9 forum.

-compn
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avformat/mpegts: fix Opus stream count

2014-12-05 Thread Rafaël Carré
That number represents the number of streams, not the number of channels
---
 libavformat/mpegts.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 97da0a3..f4250c8 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -1758,10 +1758,9 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, 
AVStream *st, int stream_type
 if (channel_config_code <= 0x8) {
 st->codec->extradata[9]  = channels = channel_config_code 
? channel_config_code : 2;
 st->codec->extradata[18] = channels > 2;
-st->codec->extradata[19] = channel_config_code;
+st->codec->extradata[19] = channels - 
opus_coupled_stream_cnt[channel_config_code];
 if (channel_config_code == 0) { /* Dual Mono */
 st->codec->extradata[18] = 255; /* Mapping */
-st->codec->extradata[19] = 2;   /* Stream Count */
 }
 st->codec->extradata[20] = 
opus_coupled_stream_cnt[channel_config_code];
 memcpy(&st->codec->extradata[21], 
opus_channel_map[channels - 1], channels);
-- 
2.1.3

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] swr: allow passing of AVFrame.data to swr_convert without, cast in C++ code

2014-12-05 Thread Michael Niedermayer
On Fri, Dec 05, 2014 at 04:14:53PM +0800, Yu Xiaolei wrote:
> 
> ---
>  libswresample/swresample.c | 4 ++--
>  libswresample/swresample.h | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)

This adds these warnings:

ibswresample/swresample.c:380:13: note: expected ‘uint8_t **’ but argument is 
of type ‘uint8_t * const*’
libswresample/swresample.c:693:5: warning: passing argument 2 of 
‘fill_audiodata’ discards ‘const’ qualifier from pointer target type [enabled 
by default]

also adding const breaks API sadly so it must be delayed until
the next major version bump see:
f00e9c4b10f5ab7cd382d3019eb7bee13fcc3866 for an example on how to
do that

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you think the mosad wants you dead since a long time then you are either
wrong or dead since a long time.


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] doc/filters: Add ascii graphics to clarify what the currently implemented tinterlace modes do

2014-12-05 Thread Michael Niedermayer
On Thu, Dec 04, 2014 at 04:57:09PM +, tim nicholson wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> On 04/12/14 16:09, Clément Bœsch wrote:
> > [..]
> > 
> > This representation requires way more efforts to me to understand than the
> > one from Michael...
> > 
> 
> Just shows how different minds think/work ;)
> 
> As the saying goes, one man's meat is another man's poison.
> 
> I was going for consistency with current work (which I happened to find
> clear) and I liked having the extra detail of line numbers.

iam fine with either but id like to see one of them or a combination
pushed. pushing neither would be worst ...

so which solution do people prefer?

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] FFmpeg in Microsoft Media Foudation

2014-12-05 Thread Jesse Jiang
Hi All,




Is there any open-source project which using ffmpeg in MFT(Microsoft Media 
Foundation). I know there is Lav project for DShow. So is there any plant to 
move to MFT.




I want to create an open-source project like this, but I have less experience 
on this. I hope some experts can invoke my project.




Best regards 

Jesse 






Sent from Surface
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH]Fixed av_fast_realloc calling error when compiled to the Dynamic library

2014-12-05 Thread 杨超
Hello,All:
source base: ffmpeg-2.2.10env:androidso/a: so
When calling the av_fast_realloc or av_fast_malloc. There will be a error ( the 
processing will feign death ).
Fixed patch:
---a/libavcodec/utils.c+++b/libavcodec/utils.c@@ -127,1 +127,1 @@-#if 
FF_API_FAST_MALLOC && CONFIG_SHARED && HAVE_SYMVER+#if FF_API_FAST_MALLOC && 
(!CONFIG_SHARED) && HAVE_SYMVER

But this bug is fixed in the ffmpeg-2.5.This fixed patch should be used for who 
are working on the pre version "ffmpeg-2.2.10". 
  
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Fixed PNG decoding with Paeth filter for RGBA 64-bits.

2014-12-05 Thread Christophe Gisquet
Hi,

2014-12-05 1:20 GMT+01:00 Dominique Leroux :
> Found and fixed an artifact in the last column of decoded RGBA 64-bits PNG 
> images.
>
> The code was dealing with a SIMD-optimized version of the function without 
> taking into account that we can have RGB/RGBA images that are respectively 6 
> or 8  bytes per pixel (not just 3 or 4).

First, what version are you working on? Ronald included a fix in
http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=af79a0c48a41fd99b674b39ac509ae442974715d
that would then be incomplete?

If true, then it probably means we don't have a "fate" test for it (ie
a means to validate ffmpeg's output against a known "good"
checksum/behaviour), or that it is unaffected by the bug.

In any case, could you share a sample file exhibiting the issue? I
guess cropping to the last few lines would be fine from a quick glance
at your patch. But I haven't studied the issue to actually validate
it.

Thank you,
-- 
Christophe
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] swr: allow passing of AVFrame.data to swr_convert without, cast in C++ code

2014-12-05 Thread Yu Xiaolei

---
 libswresample/swresample.c | 4 ++--
 libswresample/swresample.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index b0bd697..a154674 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -645,8 +645,8 @@ int swr_is_initialized(struct SwrContext *s) {
 return !!s->in_buffer.ch_count;
 }
 
-int swr_convert(struct SwrContext *s, uint8_t *out_arg[SWR_CH_MAX], int 
out_count,
-const uint8_t *in_arg [SWR_CH_MAX], int  
in_count){
+int swr_convert(struct SwrContext *s, uint8_t *const out_arg[SWR_CH_MAX], int 
out_count,
+const uint8_t *const in_arg [SWR_CH_MAX], int 
in_count) {
 AudioData * in= &s->in;
 AudioData *out= &s->out;
 
diff --git a/libswresample/swresample.h b/libswresample/swresample.h
index 37656a6..bcb39a5 100644
--- a/libswresample/swresample.h
+++ b/libswresample/swresample.h
@@ -306,8 +306,8 @@ void swr_close(struct SwrContext *s);
  *
  * @return number of samples output per channel, negative value on error
  */
-int swr_convert(struct SwrContext *s, uint8_t **out, int out_count,
-const uint8_t **in , int in_count);
+int swr_convert(struct SwrContext *s, uint8_t *const *out, int out_count,
+const uint8_t *const *in , int in_count);
 
 /**
  * Convert the next timestamp from input to output
-- 
2.1.3

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel