diff mbox

[FFmpeg-devel,1/4] avformat/matroskaenc: remove unnecessary additional codec tags

Message ID 20180921212922.8836-1-jamrial@gmail.com
State Accepted
Commit 14ac62f9af58fe3cbbf92e2aa1951e2af4b26333
Headers show

Commit Message

James Almer Sept. 21, 2018, 9:29 p.m. UTC
They are listed in riff.c already.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavformat/matroskaenc.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Carl Eugen Hoyos Sept. 21, 2018, 10:44 p.m. UTC | #1
> Am 21.09.2018 um 23:29 schrieb James Almer <jamrial@gmail.com>:
> 
> They are listed in riff.c already.
> 
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
> libavformat/matroskaenc.c | 3 ---
> 1 file changed, 3 deletions(-)
> 
> diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
> index a0e2f426f7..61efe2e3f8 100644
> --- a/libavformat/matroskaenc.c
> +++ b/libavformat/matroskaenc.c
> @@ -2735,7 +2735,6 @@ static int mkv_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt)
> 
> static const AVCodecTag additional_audio_tags[] = {
>     { AV_CODEC_ID_ALAC,      0XFFFFFFFF },
> -    { AV_CODEC_ID_EAC3,      0XFFFFFFFF },
>     { AV_CODEC_ID_MLP,       0xFFFFFFFF },
>     { AV_CODEC_ID_OPUS,      0xFFFFFFFF },
>     { AV_CODEC_ID_PCM_S16BE, 0xFFFFFFFF },
> @@ -2754,8 +2753,6 @@ static const AVCodecTag additional_video_tags[] = {
>     { AV_CODEC_ID_RV10,      0xFFFFFFFF },
>     { AV_CODEC_ID_RV20,      0xFFFFFFFF },
>     { AV_CODEC_ID_RV30,      0xFFFFFFFF },
> -    { AV_CODEC_ID_RV40,      0xFFFFFFFF },
> -    { AV_CODEC_ID_VP9,       0xFFFFFFFF },

I cannot test atm but this patch does not look ok to me.

Carl Eugen
James Almer Sept. 21, 2018, 11:01 p.m. UTC | #2
On 9/21/2018 7:44 PM, Carl Eugen Hoyos wrote:
> 
> 
>> Am 21.09.2018 um 23:29 schrieb James Almer <jamrial@gmail.com>:
>>
>> They are listed in riff.c already.
>>
>> Signed-off-by: James Almer <jamrial@gmail.com>
>> ---
>> libavformat/matroskaenc.c | 3 ---
>> 1 file changed, 3 deletions(-)
>>
>> diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
>> index a0e2f426f7..61efe2e3f8 100644
>> --- a/libavformat/matroskaenc.c
>> +++ b/libavformat/matroskaenc.c
>> @@ -2735,7 +2735,6 @@ static int mkv_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt)
>>
>> static const AVCodecTag additional_audio_tags[] = {
>>     { AV_CODEC_ID_ALAC,      0XFFFFFFFF },
>> -    { AV_CODEC_ID_EAC3,      0XFFFFFFFF },
>>     { AV_CODEC_ID_MLP,       0xFFFFFFFF },
>>     { AV_CODEC_ID_OPUS,      0xFFFFFFFF },
>>     { AV_CODEC_ID_PCM_S16BE, 0xFFFFFFFF },
>> @@ -2754,8 +2753,6 @@ static const AVCodecTag additional_video_tags[] = {
>>     { AV_CODEC_ID_RV10,      0xFFFFFFFF },
>>     { AV_CODEC_ID_RV20,      0xFFFFFFFF },
>>     { AV_CODEC_ID_RV30,      0xFFFFFFFF },
>> -    { AV_CODEC_ID_RV40,      0xFFFFFFFF },
>> -    { AV_CODEC_ID_VP9,       0xFFFFFFFF },
> 
> I cannot test atm but this patch does not look ok to me.

Could you explain why? ff_mkv_codec_tags[] has a comment that says
"If you add a tag here that is not in ff_codec_bmp_tags[] or
ff_codec_wav_tags[], add it also to additional_audio_tags[] or
additional_video_tags[] in matroskaenc.c"

The three codec ids I'm removing here, as far as i could check, are
listed in one of the two tables from riff.c. Is there something else not
explained in the Matroska sources that I'm missing?

> 
> Carl Eugen
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
James Almer Sept. 26, 2018, 4:06 p.m. UTC | #3
On 9/21/2018 8:01 PM, James Almer wrote:
> On 9/21/2018 7:44 PM, Carl Eugen Hoyos wrote:
>>
>>
>>> Am 21.09.2018 um 23:29 schrieb James Almer <jamrial@gmail.com>:
>>>
>>> They are listed in riff.c already.
>>>
>>> Signed-off-by: James Almer <jamrial@gmail.com>
>>> ---
>>> libavformat/matroskaenc.c | 3 ---
>>> 1 file changed, 3 deletions(-)
>>>
>>> diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
>>> index a0e2f426f7..61efe2e3f8 100644
>>> --- a/libavformat/matroskaenc.c
>>> +++ b/libavformat/matroskaenc.c
>>> @@ -2735,7 +2735,6 @@ static int mkv_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt)
>>>
>>> static const AVCodecTag additional_audio_tags[] = {
>>>     { AV_CODEC_ID_ALAC,      0XFFFFFFFF },
>>> -    { AV_CODEC_ID_EAC3,      0XFFFFFFFF },
>>>     { AV_CODEC_ID_MLP,       0xFFFFFFFF },
>>>     { AV_CODEC_ID_OPUS,      0xFFFFFFFF },
>>>     { AV_CODEC_ID_PCM_S16BE, 0xFFFFFFFF },
>>> @@ -2754,8 +2753,6 @@ static const AVCodecTag additional_video_tags[] = {
>>>     { AV_CODEC_ID_RV10,      0xFFFFFFFF },
>>>     { AV_CODEC_ID_RV20,      0xFFFFFFFF },
>>>     { AV_CODEC_ID_RV30,      0xFFFFFFFF },
>>> -    { AV_CODEC_ID_RV40,      0xFFFFFFFF },
>>> -    { AV_CODEC_ID_VP9,       0xFFFFFFFF },
>>
>> I cannot test atm but this patch does not look ok to me.
> 
> Could you explain why? ff_mkv_codec_tags[] has a comment that says
> "If you add a tag here that is not in ff_codec_bmp_tags[] or
> ff_codec_wav_tags[], add it also to additional_audio_tags[] or
> additional_video_tags[] in matroskaenc.c"
> 
> The three codec ids I'm removing here, as far as i could check, are
> listed in one of the two tables from riff.c. Is there something else not
> explained in the Matroska sources that I'm missing?

Ping. I'll push this patch soon otherwise.

> 
>>
>> Carl Eugen
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel@ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>
>
Carl Eugen Hoyos Sept. 26, 2018, 6:02 p.m. UTC | #4
2018-09-21 23:29 GMT+02:00, James Almer <jamrial@gmail.com>:
> They are listed in riff.c already.
>
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
>  libavformat/matroskaenc.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
> index a0e2f426f7..61efe2e3f8 100644
> --- a/libavformat/matroskaenc.c
> +++ b/libavformat/matroskaenc.c
> @@ -2735,7 +2735,6 @@ static int mkv_check_bitstream(struct AVFormatContext
> *s, const AVPacket *pkt)
>
>  static const AVCodecTag additional_audio_tags[] = {
>      { AV_CODEC_ID_ALAC,      0XFFFFFFFF },
> -    { AV_CODEC_ID_EAC3,      0XFFFFFFFF },
>      { AV_CODEC_ID_MLP,       0xFFFFFFFF },
>      { AV_CODEC_ID_OPUS,      0xFFFFFFFF },
>      { AV_CODEC_ID_PCM_S16BE, 0xFFFFFFFF },
> @@ -2754,8 +2753,6 @@ static const AVCodecTag additional_video_tags[] = {
>      { AV_CODEC_ID_RV10,      0xFFFFFFFF },
>      { AV_CODEC_ID_RV20,      0xFFFFFFFF },
>      { AV_CODEC_ID_RV30,      0xFFFFFFFF },
> -    { AV_CODEC_ID_RV40,      0xFFFFFFFF },
> -    { AV_CODEC_ID_VP9,       0xFFFFFFFF },
>      { AV_CODEC_ID_NONE,      0xFFFFFFFF }

No objections, sorry for the delay.

Thank you, Carl Eugen
diff mbox

Patch

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index a0e2f426f7..61efe2e3f8 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -2735,7 +2735,6 @@  static int mkv_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt)
 
 static const AVCodecTag additional_audio_tags[] = {
     { AV_CODEC_ID_ALAC,      0XFFFFFFFF },
-    { AV_CODEC_ID_EAC3,      0XFFFFFFFF },
     { AV_CODEC_ID_MLP,       0xFFFFFFFF },
     { AV_CODEC_ID_OPUS,      0xFFFFFFFF },
     { AV_CODEC_ID_PCM_S16BE, 0xFFFFFFFF },
@@ -2754,8 +2753,6 @@  static const AVCodecTag additional_video_tags[] = {
     { AV_CODEC_ID_RV10,      0xFFFFFFFF },
     { AV_CODEC_ID_RV20,      0xFFFFFFFF },
     { AV_CODEC_ID_RV30,      0xFFFFFFFF },
-    { AV_CODEC_ID_RV40,      0xFFFFFFFF },
-    { AV_CODEC_ID_VP9,       0xFFFFFFFF },
     { AV_CODEC_ID_NONE,      0xFFFFFFFF }
 };