[FFmpeg-devel] [PATCH] lavf: fix the wrong warning msg and comments about av_find_stream_info

2016-12-04 Thread Jun Zhao
From 1c4b61ef42baae788e950c36f292ddd2e7cd9943 Mon Sep 17 00:00:00 2001
From: Jun Zhao 
Date: Mon, 5 Dec 2016 15:17:13 +0800
Subject: [PATCH] lavf: fix the wrong  warning msg and comments about
 av_find_stream_info

av_find_stream_info() was deprecated by avformat_find_stream_info(),
correct the warning message in the avformat_find_stream_info() and
comments in the avformat.h

Signed-off-by: Jun Zhao 
---
 libavformat/avformat.h | 4 ++--
 libavformat/utils.c| 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 7c69614..adf08d7c 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1007,7 +1007,7 @@ typedef struct AVStream {
  */
 
 /**
- * Stream information used internally by av_find_stream_info()
+ * Stream information used internally by avformat_find_stream_info()
  */
 #define MAX_STD_TIMEBASES (30*12+30+3+6)
 struct {
@@ -1059,7 +1059,7 @@ typedef struct AVStream {
 int probe_packets;
 
 /**
- * Number of frames that have been demuxed during av_find_stream_info()
+ * Number of frames that have been demuxed during 
avformat_find_stream_info()
  */
 int codec_info_nb_frames;
 
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 482ff15..5f69b6b 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3449,7 +3449,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
 && codec && !avctx->codec) {
 if (avcodec_open2(avctx, codec, options ? &options[i] : 
&thread_opt) < 0)
 av_log(ic, AV_LOG_WARNING,
-   "Failed to open codec in av_find_stream_info\n");
+   "Failed to open codec in %s\n",__FUNCTION__);
 }
 
 // Try to just open decoders, in case this is enough to get parameters.
@@ -3457,7 +3457,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
 if (codec && !avctx->codec)
 if (avcodec_open2(avctx, codec, options ? &options[i] : 
&thread_opt) < 0)
 av_log(ic, AV_LOG_WARNING,
-   "Failed to open codec in av_find_stream_info\n");
+   "Failed to open codec in %s\n",__FUNCTION__);
 }
 if (!options)
 av_dict_free(&thread_opt);
@@ -3703,7 +3703,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
 av_dict_set(&opts, "codec_whitelist", 
ic->codec_whitelist, 0);
 if (avcodec_open2(avctx, codec, (options && stream_index < 
orig_nb_streams) ? &options[stream_index] : &opts) < 0)
 av_log(ic, AV_LOG_WARNING,
-"Failed to open codec in av_find_stream_info\n");
+   "Failed to open codec in %s\n",__FUNCTION__);
 av_dict_free(&opts);
 }
 }
-- 
2.9.3

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


Re: [FFmpeg-devel] [DECISION] Revoke the decision of dropping ffserver

2016-12-04 Thread Reynaldo H. Verdejo Pinochet

I support the decision to keep ffserver

Bests,

--
Reynaldo H. Verdejo Pinochet
Open Source Group - Samsung Research America

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


[FFmpeg-devel] [PATCH 2/2] avformat/matroskadec: remove the strict unofficial check for Colour elements

2016-12-04 Thread James Almer
Signed-off-by: James Almer 
---
 libavformat/matroskadec.c | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index b53a8b1..c7b406e 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2362,11 +2362,9 @@ static int matroska_parse_tracks(AVFormatContext *s)
 return ret;
 }
 
-if (s->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL) {
-int ret = mkv_parse_video_color(st, track);
-if (ret < 0)
-return ret;
-}
+ret = mkv_parse_video_color(st, track);
+if (ret < 0)
+return ret;
 } else if (track->type == MATROSKA_TRACK_TYPE_AUDIO) {
 st->codecpar->codec_type  = AVMEDIA_TYPE_AUDIO;
 st->codecpar->codec_tag   = fourcc;
-- 
2.10.2

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


[FFmpeg-devel] [PATCH 1/2] avformat/matroskadec: allocate Colour related fields only if the file contains the relevant master

2016-12-04 Thread James Almer
The demuxer doesn't fill the defaults if the master isn't present.
This results in codecpar->color_space being set with a value of
zero (RGB) on such files.

Signed-off-by: James Almer 
---
 libavformat/matroskadec.c | 54 ++-
 1 file changed, 30 insertions(+), 24 deletions(-)

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 017a533..b53a8b1 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -173,7 +173,7 @@ typedef struct MatroskaTrackVideo {
 uint64_t field_order;
 uint64_t stereo_mode;
 uint64_t alpha_mode;
-MatroskaTrackVideoColor color;
+EbmlList color;
 } MatroskaTrackVideo;
 
 typedef struct MatroskaTrackAudio {
@@ -432,7 +432,7 @@ static const EbmlSyntax matroska_track_video[] = {
 { MATROSKA_ID_VIDEOPIXELHEIGHT,EBML_UINT,  0, 
offsetof(MatroskaTrackVideo, pixel_height) },
 { MATROSKA_ID_VIDEOCOLORSPACE, EBML_BIN,   0, 
offsetof(MatroskaTrackVideo, color_space) },
 { MATROSKA_ID_VIDEOALPHAMODE,  EBML_UINT,  0, 
offsetof(MatroskaTrackVideo, alpha_mode) },
-{ MATROSKA_ID_VIDEOCOLOR,  EBML_NEST,  0, 
offsetof(MatroskaTrackVideo, color), { .n = matroska_track_video_color } },
+{ MATROSKA_ID_VIDEOCOLOR,  EBML_NEST,  
sizeof(MatroskaTrackVideoColor), offsetof(MatroskaTrackVideo, color), { .n = 
matroska_track_video_color } },
 { MATROSKA_ID_VIDEOPIXELCROPB, EBML_NONE },
 { MATROSKA_ID_VIDEOPIXELCROPT, EBML_NONE },
 { MATROSKA_ID_VIDEOPIXELCROPL, EBML_NONE },
@@ -1807,34 +1807,40 @@ static void mkv_stereo_mode_display_mul(int stereo_mode,
 }
 
 static int mkv_parse_video_color(AVStream *st, const MatroskaTrack *track) {
-const MatroskaMasteringMeta* mastering_meta =
-&track->video.color.mastering_meta;
+const MatroskaTrackVideoColor *color = track->video.color.elem;
+const MatroskaMasteringMeta *mastering_meta;
+int has_mastering_primaries, has_mastering_luminance;
+
+if (!track->video.color.nb_elem)
+return 0;
+
+mastering_meta = &color->mastering_meta;
 // Mastering primaries are CIE 1931 coords, and must be > 0.
-const int has_mastering_primaries =
+has_mastering_primaries =
 mastering_meta->r_x > 0 && mastering_meta->r_y > 0 &&
 mastering_meta->g_x > 0 && mastering_meta->g_y > 0 &&
 mastering_meta->b_x > 0 && mastering_meta->b_y > 0 &&
 mastering_meta->white_x > 0 && mastering_meta->white_y > 0;
-const int has_mastering_luminance = mastering_meta->max_luminance > 0;
-
-if (track->video.color.matrix_coefficients != AVCOL_SPC_RESERVED)
-st->codecpar->color_space = track->video.color.matrix_coefficients;
-if (track->video.color.primaries != AVCOL_PRI_RESERVED &&
-track->video.color.primaries != AVCOL_PRI_RESERVED0)
-st->codecpar->color_primaries = track->video.color.primaries;
-if (track->video.color.transfer_characteristics != AVCOL_TRC_RESERVED &&
-track->video.color.transfer_characteristics != AVCOL_TRC_RESERVED0)
-st->codecpar->color_trc = track->video.color.transfer_characteristics;
-if (track->video.color.range != AVCOL_RANGE_UNSPECIFIED &&
-track->video.color.range <= AVCOL_RANGE_JPEG)
-st->codecpar->color_range = track->video.color.range;
-if (track->video.color.chroma_siting_horz != 
MATROSKA_COLOUR_CHROMASITINGHORZ_UNDETERMINED &&
-track->video.color.chroma_siting_vert != 
MATROSKA_COLOUR_CHROMASITINGVERT_UNDETERMINED &&
-track->video.color.chroma_siting_horz  < 
MATROSKA_COLOUR_CHROMASITINGHORZ_NB &&
-track->video.color.chroma_siting_vert  < 
MATROSKA_COLOUR_CHROMASITINGVERT_NB) {
+has_mastering_luminance = mastering_meta->max_luminance > 0;
+
+if (color->matrix_coefficients != AVCOL_SPC_RESERVED)
+st->codecpar->color_space = color->matrix_coefficients;
+if (color->primaries != AVCOL_PRI_RESERVED &&
+color->primaries != AVCOL_PRI_RESERVED0)
+st->codecpar->color_primaries = color->primaries;
+if (color->transfer_characteristics != AVCOL_TRC_RESERVED &&
+color->transfer_characteristics != AVCOL_TRC_RESERVED0)
+st->codecpar->color_trc = color->transfer_characteristics;
+if (color->range != AVCOL_RANGE_UNSPECIFIED &&
+color->range <= AVCOL_RANGE_JPEG)
+st->codecpar->color_range = color->range;
+if (color->chroma_siting_horz != 
MATROSKA_COLOUR_CHROMASITINGHORZ_UNDETERMINED &&
+color->chroma_siting_vert != 
MATROSKA_COLOUR_CHROMASITINGVERT_UNDETERMINED &&
+color->chroma_siting_horz  < MATROSKA_COLOUR_CHROMASITINGHORZ_NB &&
+color->chroma_siting_vert  < MATROSKA_COLOUR_CHROMASITINGVERT_NB) {
 st->codecpar->chroma_location =
-avcodec_chroma_pos_to_enum((track->video.color.chroma_siting_horz 
- 1) << 7,
-   (track->video.color.chroma_siting_vert 
- 1) << 7);
+avcodec_c

Re: [FFmpeg-devel] [PATCH] lavf/matroskaenc.c: add early support for colour elements

2016-12-04 Thread James Almer
On 11/4/2016 11:42 AM, Neil Birkbeck wrote:
> 
> This seems to have been made official now, as usual under version 4
> like every other new element.
> 
> https://github.com/Matroska-Org/libmatroska/commit/cd05bc14b42bd88218c61837208fa2b6c79b1de4
>  
> 
> 
> Could you confirm there were no changes to the draft and remove the
> experimental checks for both decoder and encoder?
> 
> 
> There were no more changes to the draft that affected what was in this patch. 
> However, from the muxer side, the last I checked there were still players 
> that bailed out on any unknown elements (e.g., chrome, when playing back 
> through media source extensions). And on the decoder, I've noticed an issue 
> when the matroska_track_video_color is not specified: the defaults specified 
> in the EbmlSyntax for this element were not propagated to the nested struct. 
> Let me address that one first. 
> 

Just sent a patch solving this on the demuxer. Not the actual issue of
defaults not being propagated in general, but on this specific case with
the Colour master.

If you prefer trying to solve the core issue instead then that patch can
be dropped.

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


Re: [FFmpeg-devel] [PATCH 1/5] avformat/ffmdec: Remove some st->codec uses which set encoder parameters

2016-12-04 Thread Michael Niedermayer
On Mon, Dec 05, 2016 at 12:28:49AM +0100, Moritz Barsnick wrote:
> On Sat, Dec 03, 2016 at 13:23:26 +0100, Michael Niedermayer wrote:
> > > Please add a comment like /* gop_size */ here and similar ones below.
> > > Otherwise it'll be rather mysterious what's the point of all these 
> > > avio_rb* calls.
> > 
> > done locally
> 
> Are the remaining avio_rb*() calls good for anything except documenting
> the now unused fields? I know the code is just called once for the

Their only use is probably documenting


[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin


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


Re: [FFmpeg-devel] [PATCH 1/5] avformat/ffmdec: Remove some st->codec uses which set encoder parameters

2016-12-04 Thread Moritz Barsnick
On Sat, Dec 03, 2016 at 13:23:26 +0100, Michael Niedermayer wrote:
> > Please add a comment like /* gop_size */ here and similar ones below.
> > Otherwise it'll be rather mysterious what's the point of all these avio_rb* 
> > calls.
> 
> done locally

Are the remaining avio_rb*() calls good for anything except documenting
the now unused fields? I know the code is just called once for the
headers, but replacing N avio_rb*() calls with a single avio_skip()
would be way more efficient, right?

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


Re: [FFmpeg-devel] [PATCH] lavf: add ffprobe demuxer

2016-12-04 Thread Andreas Cadhalpun
On 04.12.2016 23:42, Rostislav Pehlivanov wrote:
> On 4 December 2016 at 21:54, Andreas Cadhalpun <
> andreas.cadhal...@googlemail.com> wrote:
>> As I already wrote elsewhere, I don't think disabling this by default is
>> good,
>> as it will likely cause it to bitrot. Better require '-strict
>> experimental'.
>>
>>
> What about the security reasons listed below?

If it requires the user to explicitly add '-strict experimental', it can't
be exploited in practice.
Also I'm not sure there are any real security issues with this demuxer.

>>> +For security reasons this demuxer is disabled by default, should be
>>> +enabled though the @code{--enable-demuxer=ffprobe} configure option.
>>> +
>>
>>
> Does that mean the demuxer needs to be fuzzed or does it need to be
> insecure to work?

I've fuzzed it already and only found the things I mentioned.

Best regards,
Andreas
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavf: add ffprobe demuxer

2016-12-04 Thread Nicolas George
Le quartidi 14 frimaire, an CCXXV, Rostislav Pehlivanov a écrit :
> What about the security reasons listed below?

They do not exist any more than in any similar code. They were invoked
by people who did not like this patch, and the warning was added to
accommodate them.

Regards,

-- 
  Nicolas George


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


Re: [FFmpeg-devel] [PATCH] lavf: add ffprobe demuxer

2016-12-04 Thread Rostislav Pehlivanov
On 4 December 2016 at 21:54, Andreas Cadhalpun <
andreas.cadhal...@googlemail.com> wrote:

> On 31.10.2016 09:51, Stefano Sabatini wrote:
> > From 7f209e27aa33e8f43444e5cfc44c68f664b69e06 Mon Sep 17 00:00:00 2001
> > From: Nicolas George 
> > Date: Sat, 11 Jan 2014 19:42:41 +0100
> > Subject: [PATCH] lavf: add ffprobe demuxer
> >
> > With several modifications and documentation by Stefano Sabatini
> > .
> >
> > Signed-off-by: Nicolas George 
> > ---
> >  configure|   3 +
> >  doc/demuxers.texi|  18 ++
> >  doc/ffprobe-format.texi  | 121 +
> >  doc/formats.texi |   1 +
> >  libavformat/Makefile |   1 +
> >  libavformat/allformats.c |   1 +
> >  libavformat/ffprobedec.c | 439 ++
> +
> >  7 files changed, 584 insertions(+)
> >  create mode 100644 doc/ffprobe-format.texi
> >  create mode 100644 libavformat/ffprobedec.c
> >
> > diff --git a/configure b/configure
> > index 72ffaea..71b9d73 100755
> > --- a/configure
> > +++ b/configure
> > @@ -3349,6 +3349,9 @@ for n in $COMPONENT_LIST; do
> >  eval ${n}_if_any="\$$v"
> >  done
> >
> > +# Disable ffprobe demuxer for security concerns
> > +disable ffprobe_demuxer
> > +
>
> As I already wrote elsewhere, I don't think disabling this by default is
> good,
> as it will likely cause it to bitrot. Better require '-strict
> experimental'.
>
>
What about the security reasons listed below?


>
> > +For security reasons this demuxer is disabled by default, should be
> > +enabled though the @code{--enable-demuxer=ffprobe} configure option.
> > +
>
>
Does that mean the demuxer needs to be fuzzed or does it need to be
insecure to work?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [DECISION] Revoke the decision of dropping ffserver

2016-12-04 Thread Andreas Cadhalpun
On 28.11.2016 19:15, Nicolas George wrote:
> Deadline: 2016-12-06 00:00 UTC.
> 
> I propose, and put to the discussion, that the decision to drop ffserver
> is revoked, conditioned to the fixing of the technical issues that lead
> to it.
> 
> In other words, if the technical problems that require dropping ffserver
> are resolved at the time it is about to be dropped, then it must not be
> and the patch is not applied.
> 
> I support the decision.

I support the decision, too.

> Pros:
> 
> ffserver has users, if there are no reason to drop it, doing so is a
> gratuitous annoyance to them.

Also 'make ffservertest' covers libavformat/tcp.c, which no other FATE
test does.

Best regards,
Andreas

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


Re: [FFmpeg-devel] [PATCH] lavf: add ffprobe demuxer

2016-12-04 Thread Andreas Cadhalpun
On 31.10.2016 09:51, Stefano Sabatini wrote:
> From 7f209e27aa33e8f43444e5cfc44c68f664b69e06 Mon Sep 17 00:00:00 2001
> From: Nicolas George 
> Date: Sat, 11 Jan 2014 19:42:41 +0100
> Subject: [PATCH] lavf: add ffprobe demuxer
> 
> With several modifications and documentation by Stefano Sabatini
> .
> 
> Signed-off-by: Nicolas George 
> ---
>  configure|   3 +
>  doc/demuxers.texi|  18 ++
>  doc/ffprobe-format.texi  | 121 +
>  doc/formats.texi |   1 +
>  libavformat/Makefile |   1 +
>  libavformat/allformats.c |   1 +
>  libavformat/ffprobedec.c | 439 
> +++
>  7 files changed, 584 insertions(+)
>  create mode 100644 doc/ffprobe-format.texi
>  create mode 100644 libavformat/ffprobedec.c
> 
> diff --git a/configure b/configure
> index 72ffaea..71b9d73 100755
> --- a/configure
> +++ b/configure
> @@ -3349,6 +3349,9 @@ for n in $COMPONENT_LIST; do
>  eval ${n}_if_any="\$$v"
>  done
>  
> +# Disable ffprobe demuxer for security concerns
> +disable ffprobe_demuxer
> +

As I already wrote elsewhere, I don't think disabling this by default is good,
as it will likely cause it to bitrot. Better require '-strict experimental'.

>  enable $ARCH_EXT_LIST
>  
>  die_unknown(){
> diff --git a/doc/demuxers.texi b/doc/demuxers.texi
> index 2934a1c..0e6dfbd 100644
> --- a/doc/demuxers.texi
> +++ b/doc/demuxers.texi
> @@ -243,6 +243,24 @@ file subdir/file-2.wav
>  @end example
>  @end itemize
>  
> +@section ffprobe
> +
> +ffprobe internal demuxer. It is able to demux files in the format
> +specified in the @ref{FFprobe demuxer format} chapter.
> +
> +For security reasons this demuxer is disabled by default, should be
> +enabled though the @code{--enable-demuxer=ffprobe} configure option.
> +

In that case the documentation should mention '-strict experimental'
instead of this.

> diff --git a/libavformat/ffprobedec.c b/libavformat/ffprobedec.c
> new file mode 100644
> index 000..0bc9a49
> --- /dev/null
> +++ b/libavformat/ffprobedec.c
[...]
> +static int read_section_stream(AVFormatContext *avf)
> +{
> +FFprobeContext *ffp = avf->priv_data;
> +uint8_t buf[LINE_BUFFER_SIZE];
> +int ret, index, val1, val2;
> +AVStream *st = NULL;
> +const char *val;
> +
> +av_bprint_clear(&ffp->data);
> +while ((ret = read_section_line(avf, buf, sizeof(buf {
> +if (ret < 0)
> +return ret;
> +if (!st) {
> +if (sscanf(buf, "index=%d", &index) >= 1) {
> +if (index == avf->nb_streams) {
> +if (!avformat_new_stream(avf, NULL))
> +return AVERROR(ENOMEM);
> +}
> +if ((unsigned)index >= avf->nb_streams) {
> +av_log(avf, AV_LOG_ERROR, "Invalid stream index: %d\n",
> +   index);
> +return AVERROR_INVALIDDATA;
> +}
> +st = avf->streams[index];
> +} else {
> +av_log(avf, AV_LOG_ERROR, "Stream without index\n");
> +return AVERROR_INVALIDDATA;
> +}
> +}
> +if (av_strstart(buf, "codec_name=", &val)) {
> +const AVCodecDescriptor *desc = 
> avcodec_descriptor_get_by_name(val);
> +if (desc) {
> +st->codecpar->codec_id   = desc->id;
> +st->codecpar->codec_type = desc->type;
> +}
> +if (!desc) {
> +av_log(avf, AV_LOG_WARNING, "Cannot recognize codec name 
> '%s'", val);
> +}
> +} else if (!strcmp(buf, "extradata=")) {
> +if ((ret = read_data(avf, NULL)) < 0)
> +return ret;
> +if (ffp->data.len) {

This can leak st->codecpar->extradata and thus needs:
   av_freep(&st->codecpar->extradata);

> +if ((ret = ff_alloc_extradata(st->codecpar, ffp->data.len)) 
> < 0)
> +return ret;
> +memcpy(st->codecpar->extradata, ffp->data.str, 
> ffp->data.len);
> +}
> +} else if (sscanf(buf, "time_base=%d/%d", &val1, &val2) >= 2) {
> +st->time_base.num = val1;
> +st->time_base.den = val2;
> +if (st->time_base.num <= 0 || st->time_base.den <= 0) {

This should check val1 and val2 and only afterwards set st->time_base.
Otherwise the check doesn't have the desired effect.

> +av_log(avf, AV_LOG_ERROR, "Invalid time base %d/%d\n",
> +   st->time_base.num, st->time_base.den);
> +return AVERROR_INVALIDDATA;
> +}
> +}
> +}
> +return SEC_STREAM;
> +}
> +
> +static int read_section_packet(AVFormatContext *avf, AVPacket *pkt)
> +{
> +FFprobeContext *ffp = avf->priv_data;
> +uint8_t buf[LINE_BUFFER_SIZE];
> +int ret;
> +AVPacket p;
> +char flags;
> +int has_stream_index = 0;
> +int64_t p

Re: [FFmpeg-devel] FFmpeg 2.8.9, 3.1.6, 3.0.5

2016-12-04 Thread Michael Niedermayer
On Sat, Nov 26, 2016 at 06:53:12PM +0100, Michael Niedermayer wrote:
> On Sat, Nov 26, 2016 at 01:18:32PM +0100, Reto Kromer wrote:
> > Michael Niedermayer wrote:
> > 
> > >I intend to make new releases for the 3.0, 3.1 and 2.8
> > >branches
> > >if you want to backport something, do so soon
> > >Plan is 2.8 first as its longest since its last release
> > 
> > Thank you very much for maintaining these branches!
> > 
> > May I suggest to move the 2.5 and 2.6 branches (and perhaps
> > also 2.7 branch) to the "Old Releases" section?
> 
> thats probably a good idea, ill wait a few days to see if anyone
> disagrees

moved 2.5 and 2.6 to olddownloads

and 2.8.9 release made

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

No snowflake in an avalanche ever feels responsible. -- Voltaire


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


Re: [FFmpeg-devel] [PATCH 1/3] lavfi/af_atempo: add support for unknown channel layouts

2016-12-04 Thread Nicolas George
Le quartidi 14 frimaire, an CCXXV, Marton Balint a écrit :
> Signed-off-by: Marton Balint 
> ---
>  libavfilter/af_atempo.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

All three patches look good, thanks.

Regards,

-- 
  Nicolas George


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: fix ticket id 5988 for DISCONTINUITY

2016-12-04 Thread Steven Liu
add EXT-X-DISCONTINUITY tag at the position of the append point.

Signed-off-by: Steven Liu 
---
 libavformat/hlsenc.c |   14 ++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index e16fb0c..0e55a31 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -46,6 +46,7 @@ typedef struct HLSSegment {
 char filename[1024];
 char sub_filename[1024];
 double duration; /* in seconds */
+int discont;
 int64_t pos;
 int64_t size;
 
@@ -107,6 +108,7 @@ typedef struct HLSContext {
 int64_t max_seg_size; // every segment file max size
 int nb_entries;
 int discontinuity_set;
+int discontinuity;
 
 HLSSegment *segments;
 HLSSegment *last_segment;
@@ -387,6 +389,12 @@ static int hls_append_segment(struct AVFormatContext *s, 
HLSContext *hls, double
 en->pos  = pos;
 en->size = size;
 en->next = NULL;
+en->discont  = 0;
+
+if (hls->discontinuity) {
+en->discont = 1;
+hls->discontinuity = 0;
+}
 
 if (hls->key_info_file) {
 av_strlcpy(en->key_uri, hls->key_uri, sizeof(en->key_uri));
@@ -446,6 +454,7 @@ static int parse_playlist(AVFormatContext *s, const char 
*url)
 goto fail;
 }
 
+hls->discontinuity = 0;
 while (!avio_feof(in)) {
 read_chomp_line(in, line, sizeof(line));
 if (av_strstart(line, "#EXT-X-MEDIA-SEQUENCE:", &ptr)) {
@@ -560,6 +569,10 @@ static int hls_window(AVFormatContext *s, int last)
 iv_string = en->iv_string;
 }
 
+if (en->discont) {
+avio_printf(out, "#EXT-X-DISCONTINUITY\n");
+}
+
 if (hls->flags & HLS_ROUND_DURATIONS)
 avio_printf(out, "#EXTINF:%ld,\n",  lrint(en->duration));
 else
@@ -883,6 +896,7 @@ static int hls_write_header(AVFormatContext *s)
 
 if (hls->flags & HLS_APPEND_LIST) {
 parse_playlist(s, s->filename);
+hls->discontinuity = 1;
 if (hls->init_time > 0) {
 av_log(s, AV_LOG_WARNING, "append_list mode does not support 
hls_init_time,"
" hls_init_time value will have no effect\n");
-- 
1.7.1



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


[FFmpeg-devel] [PATCH 1/3] lavfi/af_atempo: add support for unknown channel layouts

2016-12-04 Thread Marton Balint
Signed-off-by: Marton Balint 
---
 libavfilter/af_atempo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/af_atempo.c b/libavfilter/af_atempo.c
index d5d29b3..59b08ec 100644
--- a/libavfilter/af_atempo.c
+++ b/libavfilter/af_atempo.c
@@ -1014,7 +1014,7 @@ static int query_formats(AVFilterContext *ctx)
 };
 int ret;
 
-layouts = ff_all_channel_layouts();
+layouts = ff_all_channel_counts();
 if (!layouts) {
 return AVERROR(ENOMEM);
 }
-- 
2.10.0

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


[FFmpeg-devel] [PATCH 2/3] lavfi/af_channelmap: add support for unknown input channel layouts

2016-12-04 Thread Marton Balint
Signed-off-by: Marton Balint 
---
 libavfilter/af_channelmap.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c
index dcae2a2..cdd8a58 100644
--- a/libavfilter/af_channelmap.c
+++ b/libavfilter/af_channelmap.c
@@ -291,7 +291,7 @@ static int channelmap_query_formats(AVFilterContext *ctx)
 AVFilterChannelLayouts *channel_layouts = NULL;
 int ret;
 
-layouts = ff_all_channel_layouts();
+layouts = ff_all_channel_counts();
 if (!layouts) {
 ret = AVERROR(ENOMEM);
 goto fail;
@@ -316,7 +316,7 @@ static int channelmap_filter_frame(AVFilterLink *inlink, 
AVFrame *buf)
 AVFilterContext  *ctx = inlink->dst;
 AVFilterLink *outlink = ctx->outputs[0];
 const ChannelMapContext *s = ctx->priv;
-const int nch_in = 
av_get_channel_layout_nb_channels(inlink->channel_layout);
+const int nch_in = inlink->channels;
 const int nch_out = s->nch;
 int ch;
 uint8_t *source_planes[MAX_CH];
@@ -363,7 +363,7 @@ static int channelmap_config_input(AVFilterLink *inlink)
 {
 AVFilterContext *ctx = inlink->dst;
 ChannelMapContext *s = ctx->priv;
-int nb_channels = 
av_get_channel_layout_nb_channels(inlink->channel_layout);
+int nb_channels = inlink->channels;
 int i, err = 0;
 const char *channel_name;
 char layout_name[256];
@@ -378,7 +378,7 @@ static int channelmap_config_input(AVFilterLink *inlink)
 
 if (m->in_channel_idx < 0 || m->in_channel_idx >= nb_channels) {
 av_get_channel_layout_string(layout_name, sizeof(layout_name),
- 0, inlink->channel_layout);
+ nb_channels, inlink->channel_layout);
 if (m->in_channel) {
 channel_name = av_get_channel_name(m->in_channel);
 av_log(ctx, AV_LOG_ERROR,
-- 
2.10.0

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


[FFmpeg-devel] [PATCH 3/3] lavfi/af_ashowinfo: properly show input channel layout for unknown channel layouts

2016-12-04 Thread Marton Balint
Signed-off-by: Marton Balint 
---
 libavfilter/af_ashowinfo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/af_ashowinfo.c b/libavfilter/af_ashowinfo.c
index ba600cb..a81729f 100644
--- a/libavfilter/af_ashowinfo.c
+++ b/libavfilter/af_ashowinfo.c
@@ -199,7 +199,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
s->plane_checksums[0];
 }
 
-av_get_channel_layout_string(chlayout_str, sizeof(chlayout_str), -1,
+av_get_channel_layout_string(chlayout_str, sizeof(chlayout_str), 
av_frame_get_channels(buf),
  buf->channel_layout);
 
 av_log(ctx, AV_LOG_INFO,
-- 
2.10.0

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


Re: [FFmpeg-devel] [DECISION] Revoke the decision of dropping ffserver

2016-12-04 Thread Marton Balint


On Mon, 28 Nov 2016, Nicolas George wrote:


Deadline: 2016-12-06 00:00 UTC.

I propose, and put to the discussion, that the decision to drop ffserver
is revoked, conditioned to the fixing of the technical issues that lead
to it.



I vote for keeping ffserver, as there are people working on it and keeping 
it (for the moment) does not block other development efforts.


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