---
This allows to retrieve side_data before encoding, where usually AVFrame* is 
const.
The AVFrame is not modified by this function so it can safely be readonly.

 libavutil/frame.c |    2 +-
 libavutil/frame.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavutil/frame.c b/libavutil/frame.c
index cf60eb3..098bbed 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -465,7 +465,7 @@ AVFrameSideData *av_frame_new_side_data(AVFrame *frame,
     return ret;
 }
 
-AVFrameSideData *av_frame_get_side_data(AVFrame *frame,
+AVFrameSideData *av_frame_get_side_data(const AVFrame *frame,
                                         enum AVFrameSideDataType type)
 {
     int i;
diff --git a/libavutil/frame.h b/libavutil/frame.h
index 708b80d..4270f6b 100644
--- a/libavutil/frame.h
+++ b/libavutil/frame.h
@@ -489,7 +489,7 @@ AVFrameSideData *av_frame_new_side_data(AVFrame *frame,
  * @return a pointer to the side data of a given type on success, NULL if there
  * is no side data with such type in this frame.
  */
-AVFrameSideData *av_frame_get_side_data(AVFrame *frame,
+AVFrameSideData *av_frame_get_side_data(const AVFrame *frame,
                                         enum AVFrameSideDataType type);
 
 #endif /* AVUTIL_FRAME_H */
-- 
1.7.9.5

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to