Advertisement
Guest User

Untitled

a guest
Aug 6th, 2014
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.39 KB | None | 0 0
  1. diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
  2. index adf36a7..986307a 100644
  3. --- a/libavdevice/dshow.c
  4. +++ b/libavdevice/dshow.c
  5. @@ -352,6 +352,7 @@ dshow_cycle_formats(AVFormatContext *avctx, enum dshowDeviceType devtype,
  6.              VIDEO_STREAM_CONFIG_CAPS *vcaps = caps;
  7.              BITMAPINFOHEADER *bih;
  8.              int64_t *fr;
  9. +            const AVCodecTag *tags = avformat_get_riff_video_tags();
  10.  #if DSHOWDEBUG
  11.              ff_print_VIDEO_STREAM_CONFIG_CAPS(vcaps);
  12.  #endif
  13. @@ -369,7 +370,7 @@ dshow_cycle_formats(AVFormatContext *avctx, enum dshowDeviceType devtype,
  14.              if (!pformat_set) {
  15.                  enum AVPixelFormat pix_fmt = dshow_pixfmt(bih->biCompression, bih->biBitCount);
  16.                  if (pix_fmt == AV_PIX_FMT_NONE) {
  17. -                    enum AVCodecID codec_id = ff_codec_get_id(avformat_get_riff_video_tags(), bih->biCompression);
  18. +                    enum AVCodecID codec_id = av_codec_get_id(&tags, bih->biCompression);
  19.                      AVCodec *codec = avcodec_find_decoder(codec_id);
  20.                      if (codec_id == AV_CODEC_ID_NONE || !codec) {
  21.                          av_log(avctx, AV_LOG_INFO, "  unknown compression type 0x%X", (int) bih->biCompression);
  22. @@ -387,7 +388,7 @@ dshow_cycle_formats(AVFormatContext *avctx, enum dshowDeviceType devtype,
  23.                  continue;
  24.              }
  25.              if (ctx->video_codec_id != AV_CODEC_ID_RAWVIDEO) {
  26. -                if (ctx->video_codec_id != ff_codec_get_id(avformat_get_riff_video_tags(), bih->biCompression))
  27. +                if (ctx->video_codec_id != av_codec_get_id(&tags, bih->biCompression))
  28.                      goto next;
  29.              }
  30.              if (ctx->pixel_format != AV_PIX_FMT_NONE &&
  31. @@ -780,7 +781,8 @@ dshow_add_device(AVFormatContext *avctx,
  32.              codec->color_range = AVCOL_RANGE_MPEG; // just in case it needs this...
  33.          }
  34.          if (codec->pix_fmt == AV_PIX_FMT_NONE) {
  35. -            codec->codec_id = ff_codec_get_id(avformat_get_riff_video_tags(), bih->biCompression);
  36. +            const AVCodecTag *tags = avformat_get_riff_video_tags();
  37. +            codec->codec_id = av_codec_get_id(&tags, bih->biCompression);
  38.              if (codec->codec_id == AV_CODEC_ID_NONE) {
  39.                  av_log(avctx, AV_LOG_ERROR, "Unknown compression type. "
  40.                                   "Please report type 0x%X.\n", (int) bih->biCompression);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement