summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2017-02-28 10:54:36 -0500
committerVittorio Giovara <vittorio.giovara@gmail.com>2017-03-07 11:07:02 -0500
commit236577230051ad61ec67fa2d68e817d54232d2a0 (patch)
tree7e55db320d8d245a09357ec27e804efc49e523d8
parent17adcc40adf1f30cba55c9727dabc1365944d32b (diff)
mov: Ignore old spherical metadata when newer version is present
-rw-r--r--libavformat/mov.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index d5de5d6b13..f1ff6ad5b5 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3335,7 +3335,8 @@ static int mov_parse_uuid_spherical(MOVStreamContext *sc, AVIOContext *pb, size_
goto out;
/* Check for mandatory keys and values, try to support XML as best-effort */
- if (av_stristr(buffer, "<GSpherical:StitchingSoftware>") &&
+ if (!sc->spherical &&
+ av_stristr(buffer, "<GSpherical:StitchingSoftware>") &&
(val = av_stristr(buffer, "<GSpherical:Spherical>")) &&
av_stristr(val, "true") &&
(val = av_stristr(buffer, "<GSpherical:Stitched>")) &&
@@ -3348,7 +3349,7 @@ static int mov_parse_uuid_spherical(MOVStreamContext *sc, AVIOContext *pb, size_
sc->spherical->projection = AV_SPHERICAL_EQUIRECTANGULAR;
- if (av_stristr(buffer, "<GSpherical:StereoMode>")) {
+ if (av_stristr(buffer, "<GSpherical:StereoMode>") && !sc->stereo3d) {
enum AVStereo3DType mode;
if (av_stristr(buffer, "left-right"))