summaryrefslogtreecommitdiff
path: root/libavdevice
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2014-08-07 00:43:03 -0300
committerMichael Niedermayer <michaelni@gmx.at>2014-08-07 13:03:17 +0200
commit1fd880cef3055e8bed7944a4e536f7be853bf0b1 (patch)
treecfc9441209ec3c0be6b12283218c1516465c278f /libavdevice
parent0ab00a75e41f4399126777e49385c809d8fcc311 (diff)
lavd/dshow: use av_codec_get_id()
ff_codec_get_id() is a lavf internal function Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavdevice')
-rw-r--r--libavdevice/dshow.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index 2c098d4839..a54324994e 100644
--- a/libavdevice/dshow.c
+++ b/libavdevice/dshow.c
@@ -352,6 +352,7 @@ dshow_cycle_formats(AVFormatContext *avctx, enum dshowDeviceType devtype,
VIDEO_STREAM_CONFIG_CAPS *vcaps = caps;
BITMAPINFOHEADER *bih;
int64_t *fr;
+ const AVCodecTag *const tags[] = { avformat_get_riff_video_tags(), NULL };
#if DSHOWDEBUG
ff_print_VIDEO_STREAM_CONFIG_CAPS(vcaps);
#endif
@@ -369,7 +370,7 @@ dshow_cycle_formats(AVFormatContext *avctx, enum dshowDeviceType devtype,
if (!pformat_set) {
enum AVPixelFormat pix_fmt = dshow_pixfmt(bih->biCompression, bih->biBitCount);
if (pix_fmt == AV_PIX_FMT_NONE) {
- enum AVCodecID codec_id = ff_codec_get_id(avformat_get_riff_video_tags(), bih->biCompression);
+ enum AVCodecID codec_id = av_codec_get_id(tags, bih->biCompression);
AVCodec *codec = avcodec_find_decoder(codec_id);
if (codec_id == AV_CODEC_ID_NONE || !codec) {
av_log(avctx, AV_LOG_INFO, " unknown compression type 0x%X", (int) bih->biCompression);
@@ -387,7 +388,7 @@ dshow_cycle_formats(AVFormatContext *avctx, enum dshowDeviceType devtype,
continue;
}
if (ctx->video_codec_id != AV_CODEC_ID_RAWVIDEO) {
- if (ctx->video_codec_id != ff_codec_get_id(avformat_get_riff_video_tags(), bih->biCompression))
+ if (ctx->video_codec_id != av_codec_get_id(tags, bih->biCompression))
goto next;
}
if (ctx->pixel_format != AV_PIX_FMT_NONE &&
@@ -780,7 +781,8 @@ dshow_add_device(AVFormatContext *avctx,
codec->color_range = AVCOL_RANGE_MPEG; // just in case it needs this...
}
if (codec->pix_fmt == AV_PIX_FMT_NONE) {
- codec->codec_id = ff_codec_get_id(avformat_get_riff_video_tags(), bih->biCompression);
+ const AVCodecTag *const tags[] = { avformat_get_riff_video_tags(), NULL };
+ codec->codec_id = av_codec_get_id(tags, bih->biCompression);
if (codec->codec_id == AV_CODEC_ID_NONE) {
av_log(avctx, AV_LOG_ERROR, "Unknown compression type. "
"Please report type 0x%X.\n", (int) bih->biCompression);