[FFmpeg-cvslog] Merge commit '251849f06ce36ce8dc076e0fca2922119fa7e39e'

James Almer git at videolan.org
Tue Oct 17 22:51:45 EEST 2017


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Oct 17 16:47:30 2017 -0300| [68727a1dc05c5d8a3016da8867d1734e02f45d01] | committer: James Almer

Merge commit '251849f06ce36ce8dc076e0fca2922119fa7e39e'

* commit '251849f06ce36ce8dc076e0fca2922119fa7e39e':
  mkv: Add support for Spherical Video elements

See 445204cd5777e029a6674ed0739777817eda5646

Merged-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=68727a1dc05c5d8a3016da8867d1734e02f45d01
---

 libavformat/matroskadec.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 94a56ebfa7..cdb2e20bb1 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1996,11 +1996,12 @@ static int mkv_parse_video_projection(AVStream *st, const MatroskaTrack *track)
     spherical = av_spherical_alloc(&spherical_size);
     if (!spherical)
         return AVERROR(ENOMEM);
+
     spherical->projection = projection;
 
-    spherical->yaw   = (int32_t)(track->video.projection.yaw   * (1 << 16));
-    spherical->pitch = (int32_t)(track->video.projection.pitch * (1 << 16));
-    spherical->roll  = (int32_t)(track->video.projection.roll  * (1 << 16));
+    spherical->yaw   = (int32_t) (track->video.projection.yaw   * (1 << 16));
+    spherical->pitch = (int32_t) (track->video.projection.pitch * (1 << 16));
+    spherical->roll  = (int32_t) (track->video.projection.roll  * (1 << 16));
 
     spherical->padding = padding;
 


======================================================================

diff --cc libavformat/matroskadec.c
index 94a56ebfa7,3dd54ebdf6..cdb2e20bb1
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@@ -1996,19 -1624,13 +1996,20 @@@ static int mkv_parse_video_projection(A
      spherical = av_spherical_alloc(&spherical_size);
      if (!spherical)
          return AVERROR(ENOMEM);
+ 
      spherical->projection = projection;
  
-     spherical->yaw   = (int32_t)(track->video.projection.yaw   * (1 << 16));
-     spherical->pitch = (int32_t)(track->video.projection.pitch * (1 << 16));
-     spherical->roll  = (int32_t)(track->video.projection.roll  * (1 << 16));
+     spherical->yaw   = (int32_t) (track->video.projection.yaw   * (1 << 16));
+     spherical->pitch = (int32_t) (track->video.projection.pitch * (1 << 16));
+     spherical->roll  = (int32_t) (track->video.projection.roll  * (1 << 16));
  
 +    spherical->padding = padding;
 +
 +    spherical->bound_left   = l;
 +    spherical->bound_top    = t;
 +    spherical->bound_right  = r;
 +    spherical->bound_bottom = b;
 +
      ret = av_stream_add_side_data(st, AV_PKT_DATA_SPHERICAL, (uint8_t *)spherical,
                                    spherical_size);
      if (ret < 0) {



More information about the ffmpeg-cvslog mailing list