[FFmpeg-cvslog] lavc: ff_find_pix_fmt ->avpriv
Michael Niedermayer
git at videolan.org
Sat Jan 12 14:17:25 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jan 12 14:06:30 2013 +0100| [43d6ac53f262f86afff70e45a57e2e79bdbd4c30] | committer: Michael Niedermayer
lavc: ff_find_pix_fmt ->avpriv
Found-by: durandal_1707
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=43d6ac53f262f86afff70e45a57e2e79bdbd4c30
---
libavcodec/raw.h | 3 +++
libavcodec/rawdec.c | 17 ++++++++++++-----
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/libavcodec/raw.h b/libavcodec/raw.h
index 87b6c90..3e59f28 100644
--- a/libavcodec/raw.h
+++ b/libavcodec/raw.h
@@ -36,6 +36,9 @@ typedef struct PixelFormatTag {
} PixelFormatTag;
extern av_export const PixelFormatTag ff_raw_pix_fmt_tags[];
+#if LIBAVCODEC_VERSION_MAJOR < 55
enum AVPixelFormat ff_find_pix_fmt(const PixelFormatTag *tags, unsigned int fourcc);
+#endif
+enum AVPixelFormat avpriv_find_pix_fmt(const PixelFormatTag *tags, unsigned int fourcc);
#endif /* AVCODEC_RAW_H */
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 36b6b66..be693c3 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -80,7 +80,7 @@ static const PixelFormatTag pix_fmt_bps_mov[] = {
{ AV_PIX_FMT_NONE, 0 },
};
-enum AVPixelFormat ff_find_pix_fmt(const PixelFormatTag *tags, unsigned int fourcc)
+enum AVPixelFormat avpriv_find_pix_fmt(const PixelFormatTag *tags, unsigned int fourcc)
{
while (tags->pix_fmt >= 0) {
if (tags->fourcc == fourcc)
@@ -90,18 +90,25 @@ enum AVPixelFormat ff_find_pix_fmt(const PixelFormatTag *tags, unsigned int four
return AV_PIX_FMT_NONE;
}
+#if LIBAVCODEC_VERSION_MAJOR < 55
+enum AVPixelFormat ff_find_pix_fmt(const PixelFormatTag *tags, unsigned int fourcc)
+{
+ return avpriv_find_pix_fmt(tags, fourcc);
+}
+#endif
+
static av_cold int raw_init_decoder(AVCodecContext *avctx)
{
RawVideoContext *context = avctx->priv_data;
if (avctx->codec_tag == MKTAG('r','a','w',' ') || avctx->codec_tag == MKTAG('N','O','1','6'))
- avctx->pix_fmt = ff_find_pix_fmt(pix_fmt_bps_mov, avctx->bits_per_coded_sample);
+ avctx->pix_fmt = avpriv_find_pix_fmt(pix_fmt_bps_mov, avctx->bits_per_coded_sample);
else if (avctx->codec_tag == MKTAG('W','R','A','W'))
- avctx->pix_fmt = ff_find_pix_fmt(pix_fmt_bps_avi, avctx->bits_per_coded_sample);
+ avctx->pix_fmt = avpriv_find_pix_fmt(pix_fmt_bps_avi, avctx->bits_per_coded_sample);
else if (avctx->codec_tag)
- avctx->pix_fmt = ff_find_pix_fmt(ff_raw_pix_fmt_tags, avctx->codec_tag);
+ avctx->pix_fmt = avpriv_find_pix_fmt(ff_raw_pix_fmt_tags, avctx->codec_tag);
else if (avctx->pix_fmt == AV_PIX_FMT_NONE && avctx->bits_per_coded_sample)
- avctx->pix_fmt = ff_find_pix_fmt(pix_fmt_bps_avi, avctx->bits_per_coded_sample);
+ avctx->pix_fmt = avpriv_find_pix_fmt(pix_fmt_bps_avi, avctx->bits_per_coded_sample);
if (avctx->pix_fmt == AV_PIX_FMT_NONE) {
av_log(avctx, AV_LOG_ERROR, "Pixel format was not specified and cannot be detected\n");
More information about the ffmpeg-cvslog
mailing list