[FFmpeg-cvslog] avframe: mark source frame const in _ref and _clone

Vittorio Giovara git at videolan.org
Mon Oct 28 10:36:52 CET 2013


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Sat Oct 26 16:43:07 2013 +0200| [529a9893d769f381b72785c500662be2020da5fe] | committer: Anton Khirnov

avframe: mark source frame const in _ref and _clone

Signed-off-by: Anton Khirnov <anton at khirnov.net>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=529a9893d769f381b72785c500662be2020da5fe
---

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

diff --git a/libavutil/frame.c b/libavutil/frame.c
index 098bbed..99bdd8a 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -171,7 +171,7 @@ int av_frame_get_buffer(AVFrame *frame, int align)
     return AVERROR(EINVAL);
 }
 
-int av_frame_ref(AVFrame *dst, AVFrame *src)
+int av_frame_ref(AVFrame *dst, const AVFrame *src)
 {
     int i, ret = 0;
 
@@ -257,7 +257,7 @@ fail:
     return ret;
 }
 
-AVFrame *av_frame_clone(AVFrame *src)
+AVFrame *av_frame_clone(const AVFrame *src)
 {
     AVFrame *ret = av_frame_alloc();
 
diff --git a/libavutil/frame.h b/libavutil/frame.h
index b0676e7..bbff3d1 100644
--- a/libavutil/frame.h
+++ b/libavutil/frame.h
@@ -384,7 +384,7 @@ void av_frame_free(AVFrame **frame);
  *
  * @return 0 on success, a negative AVERROR on error
  */
-int av_frame_ref(AVFrame *dst, AVFrame *src);
+int av_frame_ref(AVFrame *dst, const AVFrame *src);
 
 /**
  * Create a new frame that references the same data as src.
@@ -393,7 +393,7 @@ int av_frame_ref(AVFrame *dst, AVFrame *src);
  *
  * @return newly created AVFrame on success, NULL on error.
  */
-AVFrame *av_frame_clone(AVFrame *src);
+AVFrame *av_frame_clone(const AVFrame *src);
 
 /**
  * Unreference all the buffers referenced by frame and reset the frame fields.



More information about the ffmpeg-cvslog mailing list