Skip to content

Commit

Permalink
TransmuxingController: Fix possible 'Non-FLV, Unsupported media type'…
Browse files Browse the repository at this point in the history
… bug
  • Loading branch information
xqq committed Sep 18, 2016
1 parent 1c19797 commit a037974
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/transmuxing-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,11 @@ class TransmuxingController {
_onInitChunkArrival(data, byteStart) {
let probeData = null;

if ((probeData = FlvDemuxer.probe(data)).match) {
if (byteStart > 0) {
// IOController seeked immediately after opened, byteStart > 0 callback may received
this._demuxer.bindDataSource(this._ioctl);
this._demuxer.timestampBase = this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase;
} else if ((probeData = FlvDemuxer.probe(data)).match) {
// Always create new FlvDemuxer
this._demuxer = new FlvDemuxer(probeData, this._config);

Expand Down

0 comments on commit a037974

Please sign in to comment.