mirror of
https://github.com/aler9/gortsplib
synced 2025-10-07 08:01:14 +08:00
mjpeg: fix decoding and encoding JPEG types 1-63 (#605)
Type 0 corresponds to YUV 4:2:2. Since this header is passed directly to the JPEG header, no additional changes are necessary for support. See the type field here: https://datatracker.ietf.org/doc/html/rfc2435#section-4.1 Co-authored-by: aler9 <46489434+aler9@users.noreply.github.com>
This commit is contained in:
@@ -187,7 +187,7 @@ outer:
|
||||
return nil, fmt.Errorf("SOF not found")
|
||||
}
|
||||
|
||||
if sof.Type != 1 {
|
||||
if sof.Type > 63 {
|
||||
return nil, fmt.Errorf("JPEG type %d is not supported", sof.Type)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user