Re: [FFmpeg-devel] [PATCH] matroskadec: Adjust content light side data check

2019-01-13 Thread Michael Niedermayer
On Sun, Jan 13, 2019 at 12:17:24PM -0500, Vittorio Giovara wrote:
> While in practice both fields are always initialized, this mimics
> what other tools like ffms2, and x265 do more closely.
> 
> This work has been sponsored by Tyrell Corporation, for a compensation
> of dozen of cents of US dollars.
> ---
>  libavformat/matroskadec.c | 7 ++-
>  1 file changed, 6 insertions(+), 1 deletion(-)

this  breaks fate-seek-mkv-codec-delay 

[...]
-- 
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: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] matroskadec: Adjust content light side data check

2019-01-13 Thread Paul B Mahol
On 1/13/19, Vittorio Giovara  wrote:
> While in practice both fields are always initialized, this mimics
> what other tools like ffms2, and x265 do more closely.
>
> This work has been sponsored by Tyrell Corporation, for a compensation
> of dozen of cents of US dollars.
> ---
>  libavformat/matroskadec.c | 7 ++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>

Please do not commit jokes to the tree.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] matroskadec: Adjust content light side data check

2019-01-13 Thread Carl Eugen Hoyos
2019-01-13 18:17 GMT+01:00, Vittorio Giovara :
> While in practice both fields are always initialized, this mimics
> what other tools like ffms2, and x265 do more closely.

> This work has been sponsored by Tyrell Corporation, for a compensation
> of dozen of cents of US dollars.

Please remove this.

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


Re: [FFmpeg-devel] [PATCH] matroskadec: Adjust content light side data check

2019-01-13 Thread James Almer
On 1/13/2019 2:17 PM, Vittorio Giovara wrote:
> While in practice both fields are always initialized, this mimics
> what other tools like ffms2, and x265 do more closely.
> 
> This work has been sponsored by Tyrell Corporation, for a compensation
> of dozen of cents of US dollars.
> ---
>  libavformat/matroskadec.c | 7 ++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> index 4ad99db7db..3ff3516c24 100644
> --- a/libavformat/matroskadec.c
> +++ b/libavformat/matroskadec.c
> @@ -1877,7 +1877,7 @@ static int mkv_parse_video_color(AVStream *st, const 
> MatroskaTrack *track) {
>  avcodec_chroma_pos_to_enum((color->chroma_siting_horz - 1) << 7,
> (color->chroma_siting_vert - 1) << 7);
>  }
> -if (color->max_cll && color->max_fall) {
> +if (color->max_cll || color->max_fall) {
>  size_t size = 0;
>  int ret;
>  AVContentLightMetadata *metadata = 
> av_content_light_metadata_alloc();
> @@ -1891,6 +1891,9 @@ static int mkv_parse_video_color(AVStream *st, const 
> MatroskaTrack *track) {
>  }
>  metadata->MaxCLL  = color->max_cll;
>  metadata->MaxFALL = color->max_fall;
> +av_log(NULL, AV_LOG_INFO, "Content Light Level Metadata, "
> +   "MaxCLL=%d, MaxFALL=%d",
> +   metadata->MaxCLL, metadata->MaxFALL);

This is unnecessary. av_dump_format() already prints side data information.

>  }
>  
>  if (has_mastering_primaries || has_mastering_luminance) {
> @@ -3552,6 +3555,8 @@ static int matroska_read_seek(AVFormatContext *s, int 
> stream_index,
>  AVStream *st = s->streams[stream_index];
>  int i, index, index_min;
>  
> +flags ^= AVSEEK_FLAG_ANY;

Unrelated change?

> +
>  /* Parse the CUES now since we need the index data to seek. */
>  if (matroska->cues_parsing_deferred > 0) {
>  matroska->cues_parsing_deferred = 0;
> 

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


[FFmpeg-devel] [PATCH] matroskadec: Adjust content light side data check

2019-01-13 Thread Vittorio Giovara
While in practice both fields are always initialized, this mimics
what other tools like ffms2, and x265 do more closely.

This work has been sponsored by Tyrell Corporation, for a compensation
of dozen of cents of US dollars.
---
 libavformat/matroskadec.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 4ad99db7db..3ff3516c24 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1877,7 +1877,7 @@ static int mkv_parse_video_color(AVStream *st, const 
MatroskaTrack *track) {
 avcodec_chroma_pos_to_enum((color->chroma_siting_horz - 1) << 7,
(color->chroma_siting_vert - 1) << 7);
 }
-if (color->max_cll && color->max_fall) {
+if (color->max_cll || color->max_fall) {
 size_t size = 0;
 int ret;
 AVContentLightMetadata *metadata = 
av_content_light_metadata_alloc();
@@ -1891,6 +1891,9 @@ static int mkv_parse_video_color(AVStream *st, const 
MatroskaTrack *track) {
 }
 metadata->MaxCLL  = color->max_cll;
 metadata->MaxFALL = color->max_fall;
+av_log(NULL, AV_LOG_INFO, "Content Light Level Metadata, "
+   "MaxCLL=%d, MaxFALL=%d",
+   metadata->MaxCLL, metadata->MaxFALL);
 }
 
 if (has_mastering_primaries || has_mastering_luminance) {
@@ -3552,6 +3555,8 @@ static int matroska_read_seek(AVFormatContext *s, int 
stream_index,
 AVStream *st = s->streams[stream_index];
 int i, index, index_min;
 
+flags ^= AVSEEK_FLAG_ANY;
+
 /* Parse the CUES now since we need the index data to seek. */
 if (matroska->cues_parsing_deferred > 0) {
 matroska->cues_parsing_deferred = 0;
-- 
2.20.1

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