Skip to content

Commit 7452768

Browse files
committed
Bumped astits and astikit
1 parent 7cf2e30 commit 7452768

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ module github.com/asticode/go-astisub
33
go 1.13
44

55
require (
6-
github.com/asticode/go-astikit v0.8.0
7-
github.com/asticode/go-astits v1.3.0
6+
github.com/asticode/go-astikit v0.20.0
7+
github.com/asticode/go-astits v1.8.0
88
github.com/stretchr/testify v1.4.0
99
golang.org/x/net v0.0.0-20200904194848-62affa334b73
1010
golang.org/x/text v0.3.2

go.sum

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
github.com/asticode/go-astikit v0.2.0/go.mod h1:h4ly7idim1tNhaVkdVBeXQZEE3L0xblP7fCWbgwipF0=
2-
github.com/asticode/go-astikit v0.8.0 h1:wWT7xLp96aH7cwB7f+5cAutx4hkgypDMj38g/h4sQ8o=
3-
github.com/asticode/go-astikit v0.8.0/go.mod h1:h4ly7idim1tNhaVkdVBeXQZEE3L0xblP7fCWbgwipF0=
4-
github.com/asticode/go-astits v1.3.0 h1:tlf2E0uNpL769FQr/2fZSvH1gEG5dqWezfaspGvfd+M=
5-
github.com/asticode/go-astits v1.3.0/go.mod h1:Dp78dEuksl+pWzlXTkpdd91U1QDX9r57db1XpLHm5Mw=
1+
github.com/asticode/go-astikit v0.20.0 h1:+7N+J4E4lWx2QOkRdOf6DafWJMv6O4RRfgClwQokrH8=
2+
github.com/asticode/go-astikit v0.20.0/go.mod h1:h4ly7idim1tNhaVkdVBeXQZEE3L0xblP7fCWbgwipF0=
3+
github.com/asticode/go-astits v1.8.0 h1:rf6aiiGn/QhlFjNON1n5plqF3Fs025XLUwiQ0NB6oZg=
4+
github.com/asticode/go-astits v1.8.0/go.mod h1:DkOWmBNQpnr9mv24KfZjq4JawCFX1FCqjLVGvO0DygQ=
65
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
76
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
87
github.com/pkg/profile v1.4.0/go.mod h1:NWz/XGvpEW1FyYQ7fCx4dqYBLlfTcE+A9FLAkNKqjFE=

teletext.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ type TeletextOptions struct {
335335
func ReadFromTeletext(r io.Reader, o TeletextOptions) (s *Subtitles, err error) {
336336
// Init
337337
s = &Subtitles{}
338-
var dmx = astits.New(context.Background(), r)
338+
var dmx = astits.NewDemuxer(context.Background(), r)
339339

340340
// Get the teletext PID
341341
var pid uint16
@@ -354,7 +354,7 @@ func ReadFromTeletext(r io.Reader, o TeletextOptions) (s *Subtitles, err error)
354354

355355
// Loop in data
356356
var firstTime, lastTime time.Time
357-
var d *astits.Data
357+
var d *astits.DemuxerData
358358
var ps []*teletextPage
359359
for {
360360
// Fetch next data
@@ -406,7 +406,7 @@ func ReadFromTeletext(r io.Reader, o TeletextOptions) (s *Subtitles, err error)
406406
}
407407

408408
// TODO Add tests
409-
func teletextDataTime(d *astits.Data) time.Time {
409+
func teletextDataTime(d *astits.DemuxerData) time.Time {
410410
if d.PES.Header != nil && d.PES.Header.OptionalHeader != nil && d.PES.Header.OptionalHeader.PTS != nil {
411411
return d.PES.Header.OptionalHeader.PTS.Time()
412412
} else if d.FirstPacket != nil && d.FirstPacket.AdaptationField != nil && d.FirstPacket.AdaptationField.PCR != nil {
@@ -426,7 +426,7 @@ func teletextPID(dmx *astits.Demuxer, o TeletextOptions) (pid uint16, err error)
426426
}
427427

428428
// Loop in data
429-
var d *astits.Data
429+
var d *astits.DemuxerData
430430
for {
431431
// Fetch next data
432432
if d, err = dmx.NextData(); err != nil {

webvtt.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ func parseTextWebVTT(i string) (o Line) {
237237
}
238238
case html.StartTagToken:
239239
// Parse voice name
240-
if matches := webVTTRegexpStartTag.FindStringSubmatch(string(tr.Raw())); matches != nil && len(matches) > 3 {
240+
if matches := webVTTRegexpStartTag.FindStringSubmatch(string(tr.Raw())); len(matches) > 3 {
241241
if s := strings.TrimSpace(matches[3]); s != "" {
242242
o.VoiceName = s
243243
}

0 commit comments

Comments
 (0)