disable buffer alignment in decode examples

This commit is contained in:
aler9
2022-02-01 18:03:51 +01:00
parent db69235e30
commit 5cf71f59d8
2 changed files with 2 additions and 2 deletions

View File

@@ -111,7 +111,7 @@ func (d *h264Decoder) decode(nalu []byte) (image.Image, error) {
d.dstFrame.width = d.srcFrame.width d.dstFrame.width = d.srcFrame.width
d.dstFrame.height = d.srcFrame.height d.dstFrame.height = d.srcFrame.height
d.dstFrame.color_range = C.AVCOL_RANGE_JPEG d.dstFrame.color_range = C.AVCOL_RANGE_JPEG
res = C.av_frame_get_buffer(d.dstFrame, 32) res = C.av_frame_get_buffer(d.dstFrame, 1)
if res < 0 { if res < 0 {
return nil, fmt.Errorf("av_frame_get_buffer() err") return nil, fmt.Errorf("av_frame_get_buffer() err")
} }

View File

@@ -111,7 +111,7 @@ func (d *h264Decoder) decode(nalu []byte) (image.Image, error) {
d.dstFrame.width = d.srcFrame.width d.dstFrame.width = d.srcFrame.width
d.dstFrame.height = d.srcFrame.height d.dstFrame.height = d.srcFrame.height
d.dstFrame.color_range = C.AVCOL_RANGE_JPEG d.dstFrame.color_range = C.AVCOL_RANGE_JPEG
res = C.av_frame_get_buffer(d.dstFrame, 32) res = C.av_frame_get_buffer(d.dstFrame, 1)
if res < 0 { if res < 0 {
return nil, fmt.Errorf("av_frame_get_buffer() err") return nil, fmt.Errorf("av_frame_get_buffer() err")
} }