Skip to content

Commit

Permalink
write bad segment to disk
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdarkdragon committed Jan 21, 2020
1 parent 52836e2 commit ff1330d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/testers/http_streamer.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ func (hs *httpStreamer) pushSegment(httpURL, manifestID string, seg *hlsSegment)
hs.mu.Lock()
hs.dstats.errors["Video parsing error"] = hs.dstats.errors["Video parsing error"] + 1
hs.mu.Unlock()
fname := fmt.Sprintf("bad_video_%s_%d_%d", manifestID, seg.seqNo, i)
ioutil.WriteFile(fname, tseg, 0644)
glog.Infof("Wrote bad segment to '%s'", fname)
glog.Infof("Data:\n%x", tseg)
glog.Infof("Data as string:\n%s", string(tseg))
panic(msg)
Expand Down

0 comments on commit ff1330d

Please sign in to comment.