codec/mjpeg/jpeg.go: renamed ParseScan to ParsePayload, updated call and comment

This commit is contained in:
Saxon 2019-12-23 12:59:25 +10:30
parent 545e7b858f
commit 2d7a400b3e
2 changed files with 3 additions and 3 deletions

View File

@ -72,7 +72,7 @@ func (e *Extractor) Extract(dst io.Writer, src io.Reader, delay time.Duration) e
return fmt.Errorf("could not read RTP marker: %w", err)
}
err = c.ParseScan(p, m)
err = c.ParsePayload(p, m)
if err != nil {
return fmt.Errorf("could not parse JPEG scan: %w", err)
}

View File

@ -151,8 +151,8 @@ func NewCtx(d io.Writer) *Ctx {
}
}
// ParseScan will parse a JPEG scan from an RTP/JPEG payload and append
func (c *Ctx) ParseScan(p []byte, m bool) error {
// ParsePayload will parse an RTP/JPEG payload and append to current image.
func (c *Ctx) ParsePayload(p []byte, m bool) error {
b := newByteStream(p)
_ = b.get8() // Ignore type-specific flag