[FFmpeg-cvslog] lavc: support building with the forks ABI for avcodec_find_best_pix_fmt2()

Michael Niedermayer git at videolan.org
Fri Aug 31 21:41:05 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Aug 31 20:35:27 2012 +0200| [dfb4757bbe110650b903bc763f8f61c930fa70a2] | committer: Michael Niedermayer

lavc: support building with the forks ABI for avcodec_find_best_pix_fmt2()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/avcodec.h    |    7 +++++++
 libavcodec/imgconvert.c |    8 ++++++++
 2 files changed, 15 insertions(+)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index dc58c8c..199dd3b 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -4597,8 +4597,15 @@ enum PixelFormat avcodec_find_best_pix_fmt_of_2(enum PixelFormat dst_pix_fmt1, e
                                             enum PixelFormat src_pix_fmt, int has_alpha, int *loss_ptr);
 
 attribute_deprecated
+#if AV_HAVE_INCOMPATIBLE_FORK_ABI
+enum PixelFormat avcodec_find_best_pix_fmt2(enum PixelFormat *pix_fmt_list,
+                                            enum PixelFormat src_pix_fmt,
+                                            int has_alpha, int *loss_ptr);
+#else
 enum PixelFormat avcodec_find_best_pix_fmt2(enum PixelFormat dst_pix_fmt1, enum PixelFormat dst_pix_fmt2,
                                             enum PixelFormat src_pix_fmt, int has_alpha, int *loss_ptr);
+#endif
+
 
 enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum PixelFormat * fmt);
 
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index cbd46cd..82da64b 100644
--- a/libavcodec/imgconvert.c
+++ b/libavcodec/imgconvert.c
@@ -577,11 +577,19 @@ enum PixelFormat avcodec_find_best_pix_fmt_of_2(enum PixelFormat dst_pix_fmt1, e
     return dst_pix_fmt;
 }
 
+#if AV_HAVE_INCOMPATIBLE_FORK_ABI
+enum PixelFormat avcodec_find_best_pix_fmt2(enum PixelFormat *pix_fmt_list,
+                                            enum PixelFormat src_pix_fmt,
+                                            int has_alpha, int *loss_ptr){
+    return avcodec_find_best_pix_fmt_of_list(pix_fmt_list, src_pix_fmt, has_alpha, loss_ptr);
+}
+#else
 enum PixelFormat avcodec_find_best_pix_fmt2(enum PixelFormat dst_pix_fmt1, enum PixelFormat dst_pix_fmt2,
                                             enum PixelFormat src_pix_fmt, int has_alpha, int *loss_ptr)
 {
     return avcodec_find_best_pix_fmt_of_2(dst_pix_fmt1, dst_pix_fmt2, src_pix_fmt, has_alpha, loss_ptr);
 }
+#endif
 
 enum PixelFormat avcodec_find_best_pix_fmt_of_list(enum PixelFormat *pix_fmt_list,
                                             enum PixelFormat src_pix_fmt,



More information about the ffmpeg-cvslog mailing list