[FFmpeg-devel] [PATCH] avutil/frame: document data alignment restriction
Muhammad Faiz
mfcc64 at gmail.com
Sat Jul 22 17:02:32 EEST 2017
The behaviour is based on assumptions:
- copying audio data is cheap, so keeping data alignment is cheap,
- copying video data is not cheap, so keeping data alignment is not cheap,
e.g. crop filter.
Should fix Ticket6349.
Note that after fc3a03fcf9cd7eafe7342e2508e6128888efa0bb, the crash has
been fixed.
Signed-off-by: Muhammad Faiz <mfcc64 at gmail.com>
---
libavutil/frame.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavutil/frame.h b/libavutil/frame.h
index 26261d7e40..1b08eec231 100644
--- a/libavutil/frame.h
+++ b/libavutil/frame.h
@@ -202,6 +202,9 @@ typedef struct AVFrame {
* up to 16 bytes beyond the planes, if these filters are to be used,
* then 16 extra bytes must be allocated.
*
+ * For audio, the data should be aligned to CPUs alignment preference.
+ * For video, no restriction on the alignment.
+ *
* NOTE: Except for hwaccel formats, pointers not needed by the format
* MUST be set to NULL.
*/
--
2.13.2
More information about the ffmpeg-devel
mailing list