File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -298,7 +298,7 @@ function Stream(config) {
298298
299299 Promise . all ( promises )
300300 . then ( ( ) => {
301- return _createBufferSinks ( previousSourceBufferSinks )
301+ return _createBufferSinks ( previousSourceBufferSinks , representationsFromPreviousPeriod )
302302 } )
303303 . then ( ( bufferSinks ) => {
304304 if ( streamProcessors . length === 0 ) {
@@ -527,14 +527,16 @@ function Stream(config) {
527527 /**
528528 * Creates the SourceBufferSink objects for all StreamProcessors
529529 * @param {array } previousSourceBufferSinks
530+ * @param {array } representationsFromPreviousPeriod
530531 * @return {Promise<object> }
531532 * @private
532533 */
533- function _createBufferSinks ( previousSourceBufferSinks ) {
534+ function _createBufferSinks ( previousSourceBufferSinks , representationsFromPreviousPeriod ) {
534535 return new Promise ( ( resolve ) => {
535536 const buffers = { } ;
536537 const promises = streamProcessors . map ( ( sp ) => {
537- const oldRepresentation = sp . getRepresentation ( ) ;
538+ const spRepresentation = sp . getRepresentation ( ) ;
539+ const oldRepresentation = representationsFromPreviousPeriod . find ( ( r ) => r . mediaInfo . type === spRepresentation . mediaInfo . type ) ;
538540 return sp . createBufferSinks ( previousSourceBufferSinks , oldRepresentation ) ;
539541 } ) ;
540542
You can’t perform that action at this time.
0 commit comments