Merge master.
authorCarl Hetherington <cth@carlh.net>
Wed, 15 Jan 2014 16:36:28 +0000 (16:36 +0000)
committerCarl Hetherington <cth@carlh.net>
Wed, 15 Jan 2014 16:36:28 +0000 (16:36 +0000)
1  2 
src/lib/encoder.cc
src/lib/ffmpeg_decoder.cc
src/lib/ffmpeg_examiner.cc
src/lib/film.cc
src/lib/player.cc
src/lib/transcode_job.cc

Simple merge
index 8742c48ecd6360021bcb309636ba376a300ccc28,a6f9a17c3bc7978e91821e64758f1be52a2361b6..52afe2a271e79360cf8fea54257f3e6b239495c9
@@@ -157,11 -164,9 +157,9 @@@ FFmpegDecoder::pass (
                }
  
                flush ();
 -              return;
 +              return true;
        }
  
-       avcodec_get_frame_defaults (_frame);
        shared_ptr<const Film> film = _film.lock ();
        assert (film);
  
@@@ -561,11 -555,11 +559,16 @@@ FFmpegDecoder::decode_subtitle_packet (
        /* Subtitle PTS in seconds (within the source, not taking into account any of the
           source that we may have chopped off for the DCP)
        */
++<<<<<<< HEAD
 +      double const packet_time = (static_cast<double> (sub.pts ) / AV_TIME_BASE) + _pts_offset;
 +      
++=======
+       double const packet_time = (static_cast<double> (sub.pts ) / AV_TIME_BASE) + _video_pts_offset;
++>>>>>>> master
        /* hence start time for this sub */
 -      Time const from = (packet_time + (double (sub.start_display_time) / 1e3)) * TIME_HZ;
 -      Time const to = (packet_time + (double (sub.end_display_time) / 1e3)) * TIME_HZ;
 +      ContentTime const from = (packet_time + (double (sub.start_display_time) / 1e3)) * TIME_HZ;
 +      ContentTime const to = (packet_time + (double (sub.end_display_time) / 1e3)) * TIME_HZ;
  
        AVSubtitleRect const * rect = sub.rects[0];
  
Simple merge
diff --cc src/lib/film.cc
Simple merge
index 260476242fcb91acacebb87a1cb50b61d90367bc,ce51097334be3e6a48107033e8446568d2dc0c4f..77630f0e3c8e4e5d4f442351ae05e876d7d78f00
@@@ -661,8 -686,17 +662,22 @@@ Player::update_subtitle (
                true
                );
  
++<<<<<<< HEAD
 +      _out_subtitle.from = _in_subtitle.subtitle->dcp_time;
 +      _out_subtitle.to = _in_subtitle.subtitle->dcp_time_to;
++=======
+       /* XXX: hack */
+       Time from = _in_subtitle.from;
+       Time to = _in_subtitle.to;
+       shared_ptr<VideoContent> vc = dynamic_pointer_cast<VideoContent> (piece->content);
+       if (vc) {
+               from = rint (from * vc->video_frame_rate() / _film->video_frame_rate());
+               to = rint (to * vc->video_frame_rate() / _film->video_frame_rate());
+       }
+       
+       _out_subtitle.from = from * piece->content->position ();
+       _out_subtitle.to = to + piece->content->position ();
++>>>>>>> master
  }
  
  /** Re-emit the last frame that was emitted, using current settings for crop, ratio, scaler and subtitles.
Simple merge