export Sps inside avc.Context

pull/296/head
q191201771 2 years ago
parent 1215464cbe
commit 9d8a9b84e2

@ -89,6 +89,8 @@ type Context struct {
Level uint8
Width uint32
Height uint32
Sps Sps
}
// DecoderConfigurationRecord

@ -42,6 +42,8 @@ func ParseSps(payload []byte, ctx *Context) error {
ctx.Width = (sps.PicWidthInMbsMinusOne+1)*16 - (sps.FrameCropLeftOffset+sps.FrameCropRightOffset)*2
ctx.Height = (2-uint32(sps.FrameMbsOnlyFlag))*(sps.PicHeightInMapUnitsMinusOne+1)*16 - (sps.FrameCropTopOffset+sps.FrameCropBottomOffset)*2
ctx.Sps = sps
return nil
}

Loading…
Cancel
Save