[libav-devel] [PATCH] matroskadec: don't warn about unknown spherical medata when none is present

James Almer jamrial at gmail.com
Thu Nov 2 16:14:40 CET 2017


On 11/2/2017 12:01 PM, Luca Barbato wrote:
> On 02/11/2017 15:03, James Almer wrote:
>> track->video.projection.type is 0 by default, and is the value set by the
>> demuxer for files without the element.
>>
>> Signed-off-by: James Almer <jamrial at gmail.com>
>> ---
>>   libavformat/matroskadec.c | 3 ---
>>   1 file changed, 3 deletions(-)
>>
>> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
>> index c6e1a190a8..5ed03bb642 100644
>> --- a/libavformat/matroskadec.c
>> +++ b/libavformat/matroskadec.c
>> @@ -1659,9 +1659,6 @@ static int mkv_parse_video_projection(AVStream
>> *st, const MatroskaTrack *track)
>>           }
>>           break;
>>       default:
>> -        av_log(NULL, AV_LOG_WARNING,
>> -               "Unknown spherical metadata type %"PRIu64"\n",
>> -               track->video.projection.type);
>>           return 0;
>>       }
>>  
> 
> not sure if would be overkill add a
> 
> 0: return 0; // nothing to do
> 
> or such.

I don't think that's a good idea. There are projections we don't support
which need to be handled by default:.
Unless of course you prefer handling actual projection values we don't
support and 0 ("rectangular" as called by Mastroska, which is the same
as none) in a different way.


More information about the libav-devel mailing list