Bug 1470944 - Don't attempt to create a new demuxer upon changeType call r=bryce

Re-creating a new demuxer is fine, provided that the SourceBufferResource exists. However, a resource is only created upon receiving an init segment.

The segment following a call to changeType() must be an init segment, will let the demuxer creation occurs there.

Differential Revision: https://phabricator.services.mozilla.com/D1812
This commit is contained in:
Jean-Yves Avenard 2018-06-25 19:13:13 +00:00
Родитель 758db2df67
Коммит 507a82e41c
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -286,8 +286,11 @@ TrackBuffersManager::ProcessTasks()
mType = task->As<ChangeTypeTask>()->mType;
mChangeTypeReceived = true;
mInitData = nullptr;
// A new input buffer will be created once we receive a new init segment.
// The first segment received after a changeType call must be an init
// segment.
mCurrentInputBuffer = nullptr;
CompleteResetParserState();
CreateDemuxerforMIMEType();
break;
default:
NS_WARNING("Invalid Task");