matroskadec: don't warn about unknown spherical medata when none is present
authorJames Almer <jamrial@gmail.com>
Thu, 2 Nov 2017 23:42:05 +0000 (20:42 -0300)
committerJames Almer <jamrial@gmail.com>
Fri, 3 Nov 2017 22:41:08 +0000 (19:41 -0300)
track->video.projection.type is set to 0 (a Matroska specific "No spherical
metadata present" value, with no related AVSphericalMapping) by default on
files without the element.

This removes bogus warnings on every single matroska file without Spherical
metadata.

Signed-off-by: James Almer <jamrial@gmail.com>
libavformat/matroskadec.c

index c6e1a19..3953cd3 100644 (file)
@@ -1658,6 +1658,9 @@ static int mkv_parse_video_projection(AVStream *st, const MatroskaTrack *track)
             return AVERROR_INVALIDDATA;
         }
         break;
+    case MATROSKA_VIDEO_PROJECTION_TYPE_RECTANGULAR:
+        /* No Spherical metadata */
+        return 0;
     default:
         av_log(NULL, AV_LOG_WARNING,
                "Unknown spherical metadata type %"PRIu64"\n",