avformat/movenc: restrict st3d and sv3d mov atoms to MODE_MP4
authorJames Almer <jamrial@gmail.com>
Mon, 27 Mar 2017 20:09:45 +0000 (17:09 -0300)
committerJames Almer <jamrial@gmail.com>
Mon, 27 Mar 2017 21:53:52 +0000 (18:53 -0300)
libavformat/movenc.c

index 112471d..0891e72 100644 (file)
@@ -1962,7 +1962,7 @@ static int mov_write_video_tag(AVIOContext *pb, MOVMuxContext *mov, MOVTrack *tr
             av_log(mov->fc, AV_LOG_WARNING, "Not writing 'colr' atom. Format is not MOV or MP4.\n");
     }
 
-    if (mov->fc->strict_std_compliance <= FF_COMPLIANCE_EXPERIMENTAL) {
+    if (track->mode == MODE_MP4 && mov->fc->strict_std_compliance <= FF_COMPLIANCE_EXPERIMENTAL) {
         AVStereo3D* stereo_3d = (AVStereo3D*) av_stream_get_side_data(track->st, AV_PKT_DATA_STEREO3D, NULL);
         AVSphericalMapping* spherical_mapping = (AVSphericalMapping*)av_stream_get_side_data(track->st, AV_PKT_DATA_SPHERICAL, NULL);