Skip to content

Commit 8b1103e

Browse files
committed
Added copy props
1 parent 0c2ebd3 commit 8b1103e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

sys/ffmpeg61/avutil_frame.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,16 @@ func AVUtil_frame_get_num_planes(frame *AVFrame) int {
121121
}
122122
}
123123

124+
// Copy only "metadata" fields from src to dst, those fields that do not affect the data layout in the buffers.
125+
// E.g. pts, sample rate (for audio) or sample aspect ratio (for video), but not width/height or channel layout.
126+
// Side data is also copied.
127+
func AVUtil_frame_copy_props(dst, src *AVFrame) error {
128+
if ret := AVError(C.av_frame_copy_props((*C.struct_AVFrame)(dst), (*C.struct_AVFrame)(src))); ret != 0 {
129+
return ret
130+
}
131+
return nil
132+
}
133+
124134
////////////////////////////////////////////////////////////////////////////////
125135
// PROPERTIES
126136

0 commit comments

Comments
 (0)