Skip to content

Commit

Permalink
hwa: allow software implementation if possible
Browse files Browse the repository at this point in the history
my patched ffmpeg is required
  • Loading branch information
wang-bin committed Nov 14, 2017
1 parent ae41a03 commit 945beba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/codec/video/VideoDecoderFFmpegHW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ bool VideoDecoderFFmpegHWPrivate::prepare()

AVPixelFormat VideoDecoderFFmpegHWPrivate::getFormat(struct AVCodecContext *avctx, const AVPixelFormat *pi_fmt)
{
#ifdef AV_HWACCEL_FLAG_ALLOW_SOFTWARE
avctx->hwaccel_flags |= AV_HWACCEL_FLAG_ALLOW_SOFTWARE;
#endif
bool can_hwaccel = false;
for (size_t i = 0; pi_fmt[i] != QTAV_PIX_FMT_C(NONE); i++) {
const AVPixFmtDescriptor *dsc = av_pix_fmt_desc_get(pi_fmt[i]);
Expand Down

0 comments on commit 945beba

Please sign in to comment.