diff --git a/packager/app/test/packager_test.py b/packager/app/test/packager_test.py
index 32607fc08b..8ddcf92852 100755
--- a/packager/app/test/packager_test.py
+++ b/packager/app/test/packager_test.py
@@ -1010,6 +1010,17 @@ class PackagerFunctionalTest(PackagerAppTest):
ad_cues='1.5'))
self._CheckTestResults('encryption-and-ad-cues')
+ def testEncryptionAndAdCuesAndDashTrickPlay(self):
+ streams = [
+ self._GetStream('audio'),
+ self._GetStream('video'),
+ self._GetStream('video', trick_play_factor=1),
+ ]
+ self.assertPackageSuccess(
+ streams, self._GetFlags(
+ encryption=True, output_dash=True, ad_cues='1.5'))
+ self._CheckTestResults('encryption-and-ad-cues-and-dash-trick-play')
+
def testEncryptionAndAdCuesSplitContent(self):
self.assertPackageSuccess(
self._GetStreams(
diff --git a/packager/app/test/testdata/encryption-and-ad-cues-and-dash-trick-play/bear-640x360-audio.mp4 b/packager/app/test/testdata/encryption-and-ad-cues-and-dash-trick-play/bear-640x360-audio.mp4
new file mode 100644
index 0000000000..1941c3bec3
Binary files /dev/null and b/packager/app/test/testdata/encryption-and-ad-cues-and-dash-trick-play/bear-640x360-audio.mp4 differ
diff --git a/packager/app/test/testdata/encryption-and-ad-cues-and-dash-trick-play/bear-640x360-video-trick_play_factor_1.mp4 b/packager/app/test/testdata/encryption-and-ad-cues-and-dash-trick-play/bear-640x360-video-trick_play_factor_1.mp4
new file mode 100644
index 0000000000..a71bd09ad1
Binary files /dev/null and b/packager/app/test/testdata/encryption-and-ad-cues-and-dash-trick-play/bear-640x360-video-trick_play_factor_1.mp4 differ
diff --git a/packager/app/test/testdata/encryption-and-ad-cues-and-dash-trick-play/bear-640x360-video.mp4 b/packager/app/test/testdata/encryption-and-ad-cues-and-dash-trick-play/bear-640x360-video.mp4
new file mode 100644
index 0000000000..c82b090d9e
Binary files /dev/null and b/packager/app/test/testdata/encryption-and-ad-cues-and-dash-trick-play/bear-640x360-video.mp4 differ
diff --git a/packager/app/test/testdata/encryption-and-ad-cues-and-dash-trick-play/output.mpd b/packager/app/test/testdata/encryption-and-ad-cues-and-dash-trick-play/output.mpd
new file mode 100644
index 0000000000..a69aa022e2
--- /dev/null
+++ b/packager/app/test/testdata/encryption-and-ad-cues-and-dash-trick-play/output.mpd
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+ AAAANHBzc2gBAAAAEHfv7MCyTQKs4zweUuL7SwAAAAExMjM0NTY3ODkwMTIzNDU2AAAAAA==
+
+
+
+ bear-640x360-audio.mp4
+
+
+
+
+
+
+
+
+ AAAANHBzc2gBAAAAEHfv7MCyTQKs4zweUuL7SwAAAAExMjM0NTY3ODkwMTIzNDU2AAAAAA==
+
+
+ bear-640x360-video.mp4
+
+
+
+
+
+
+
+
+ AAAANHBzc2gBAAAAEHfv7MCyTQKs4zweUuL7SwAAAAExMjM0NTY3ODkwMTIzNDU2AAAAAA==
+
+
+
+ bear-640x360-video-trick_play_factor_1.mp4
+
+
+
+
+
+
+
+
+
+
+ AAAANHBzc2gBAAAAEHfv7MCyTQKs4zweUuL7SwAAAAExMjM0NTY3ODkwMTIzNDU2AAAAAA==
+
+
+
+ bear-640x360-audio.mp4
+
+
+
+
+
+
+
+
+ AAAANHBzc2gBAAAAEHfv7MCyTQKs4zweUuL7SwAAAAExMjM0NTY3ODkwMTIzNDU2AAAAAA==
+
+
+ bear-640x360-video.mp4
+
+
+
+
+
+
+
+
+ AAAANHBzc2gBAAAAEHfv7MCyTQKs4zweUuL7SwAAAAExMjM0NTY3ODkwMTIzNDU2AAAAAA==
+
+
+
+ bear-640x360-video-trick_play_factor_1.mp4
+
+
+
+
+
+
+
diff --git a/packager/media/trick_play/trick_play_handler.cc b/packager/media/trick_play/trick_play_handler.cc
index e351dda462..b6162162d7 100644
--- a/packager/media/trick_play/trick_play_handler.cc
+++ b/packager/media/trick_play/trick_play_handler.cc
@@ -39,6 +39,11 @@ Status TrickPlayHandler::Process(std::unique_ptr stream_data) {
case StreamDataType::kMediaSample:
return OnMediaSample(*stream_data->media_sample);
+ case StreamDataType::kCueEvent:
+ // Add the cue event to be dispatched later.
+ delayed_messages_.push_back(std::move(stream_data));
+ return Status::OK;
+
default:
return Status(error::TRICK_PLAY_ERROR,
"Trick play only supports stream info, segment info, and "