mirror of https://bitbucket.org/ausocean/av.git
codec/mjpeg/jpeg.go: renamed ParseScan to ParsePayload, updated call and comment
This commit is contained in:
parent
545e7b858f
commit
2d7a400b3e
|
@ -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)
|
return fmt.Errorf("could not read RTP marker: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
err = c.ParseScan(p, m)
|
err = c.ParsePayload(p, m)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("could not parse JPEG scan: %w", err)
|
return fmt.Errorf("could not parse JPEG scan: %w", err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -151,8 +151,8 @@ func NewCtx(d io.Writer) *Ctx {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ParseScan will parse a JPEG scan from an RTP/JPEG payload and append
|
// ParsePayload will parse an RTP/JPEG payload and append to current image.
|
||||||
func (c *Ctx) ParseScan(p []byte, m bool) error {
|
func (c *Ctx) ParsePayload(p []byte, m bool) error {
|
||||||
b := newByteStream(p)
|
b := newByteStream(p)
|
||||||
_ = b.get8() // Ignore type-specific flag
|
_ = b.get8() // Ignore type-specific flag
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue