diff mbox

[FFmpeg-devel] matroskaenc: remove unofficial compliance on color information

Message ID 20170115135953.36844-1-atomnuker@gmail.com
State Accepted
Commit e7dec52d4da7fad61f65529d5a396968e3dfe777
Headers show

Commit Message

Rostislav Pehlivanov Jan. 15, 2017, 1:59 p.m. UTC
When support for this was added the details weren't yet finalized.
This is no longer the case.
Fixes writing of mkv/webm files with HDR.

Reported-by: Kagami Hiiragi <kagami@genshiken.org>
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
---
 libavformat/matroskaenc.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Comments

James Almer Jan. 15, 2017, 2:16 p.m. UTC | #1
On 1/15/2017 10:59 AM, Rostislav Pehlivanov wrote:
> When support for this was added the details weren't yet finalized.
> This is no longer the case.
> Fixes writing of mkv/webm files with HDR.

Should be ok. It's been months since these elements were made official
in the spec and afaics we're writing them right.

> 
> Reported-by: Kagami Hiiragi <kagami@genshiken.org>
> Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
> ---
>  libavformat/matroskaenc.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
> index 4e4afc17db..f731b678b9 100644
> --- a/libavformat/matroskaenc.c
> +++ b/libavformat/matroskaenc.c
> @@ -1248,11 +1248,9 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
>              uint32_t color_space = av_le2ne32(par->codec_tag);
>              put_ebml_binary(pb, MATROSKA_ID_VIDEOCOLORSPACE, &color_space, sizeof(color_space));
>          }
> -        if (s->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL) {
> -            ret = mkv_write_video_color(pb, par, st);
> -            if (ret < 0)
> -                return ret;
> -        }
> +        ret = mkv_write_video_color(pb, par, st);
> +        if (ret < 0)
> +            return ret;
>          end_ebml_master(pb, subinfo);
>          break;
>  
>
Rostislav Pehlivanov Jan. 15, 2017, 5:51 p.m. UTC | #2
On 15 January 2017 at 14:16, James Almer <jamrial@gmail.com> wrote:

> On 1/15/2017 10:59 AM, Rostislav Pehlivanov wrote:
> > When support for this was added the details weren't yet finalized.
> > This is no longer the case.
> > Fixes writing of mkv/webm files with HDR.
>
> Should be ok. It's been months since these elements were made official
> in the spec and afaics we're writing them right.
>
> >
> > Reported-by: Kagami Hiiragi <kagami@genshiken.org>
> > Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
> > ---
> >  libavformat/matroskaenc.c | 8 +++-----
> >  1 file changed, 3 insertions(+), 5 deletions(-)
> >
> > diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
> > index 4e4afc17db..f731b678b9 100644
> > --- a/libavformat/matroskaenc.c
> > +++ b/libavformat/matroskaenc.c
> > @@ -1248,11 +1248,9 @@ static int mkv_write_track(AVFormatContext *s,
> MatroskaMuxContext *mkv,
> >              uint32_t color_space = av_le2ne32(par->codec_tag);
> >              put_ebml_binary(pb, MATROSKA_ID_VIDEOCOLORSPACE,
> &color_space, sizeof(color_space));
> >          }
> > -        if (s->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL) {
> > -            ret = mkv_write_video_color(pb, par, st);
> > -            if (ret < 0)
> > -                return ret;
> > -        }
> > +        ret = mkv_write_video_color(pb, par, st);
> > +        if (ret < 0)
> > +            return ret;
> >          end_ebml_master(pb, subinfo);
> >          break;
> >
> >
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

Thanks, pushed
diff mbox

Patch

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 4e4afc17db..f731b678b9 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -1248,11 +1248,9 @@  static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
             uint32_t color_space = av_le2ne32(par->codec_tag);
             put_ebml_binary(pb, MATROSKA_ID_VIDEOCOLORSPACE, &color_space, sizeof(color_space));
         }
-        if (s->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL) {
-            ret = mkv_write_video_color(pb, par, st);
-            if (ret < 0)
-                return ret;
-        }
+        ret = mkv_write_video_color(pb, par, st);
+        if (ret < 0)
+            return ret;
         end_ebml_master(pb, subinfo);
         break;