mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 15:16:51 +08:00
disable buffer alignment in decode examples
This commit is contained in:
@@ -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")
|
||||||
}
|
}
|
||||||
|
@@ -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")
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user