[FFmpeg-trac] #8036(undetermined:new): avcodec_open2 with h264_qsv fails with "Internal error - this should not happen" on Windows 10

FFmpeg trac at avcodec.org
Wed Jul 24 16:48:03 EEST 2019


#8036: avcodec_open2 with h264_qsv fails with "Internal error - this should not
happen" on Windows 10
-------------------------------------+-------------------------------------
             Reporter:  pweber       |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:  4.1
  undetermined                       |
             Keywords:  API          |               Blocked By:
  h264_qsv avcodec_open2 MSX         |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug: Using version 4.1.4 source built with both NVIDIA and
 Intel (MFX) libraries on a Windows 10 OS, when using the codec named
 h264_qsv: avcodec_open2 fails with "Internal error - this should not
 happen." Sample code attached.

 How to reproduce:
 {{{
 encodingFormat = AV_PIX_FMT_QSV;
 codec = avcodec_find_encoder_by_name ("h264_qsv");
 avFrame = av_frame_alloc ();
 encodingContext = avcodec_alloc_context3 (codec);
 avFrame->format = encodingFormat;
 avFrame->width = width;
 avFrame->height = height;
 swsContext = sws_getContext (width, height, framePixFormat, width, height,
 encodingFormat, SWS_BICUBIC, 0, 0, 0);
 encodingContext->width = width;
 encodingContext->height = height;
 encodingContext->time_base = av_make_q (1, framesPerSecond);
 encodingContext->bit_rate = bitRate;
 encodingContext->gop_size = 30;
 encodingContext->max_b_frames = 4;
 encodingContext->pix_fmt = encodingFormat;

 Other options:
 zerolatency=1
 slice-max-size=20000
 ps=30000
 threads=4
 cabac=0
 max_nal_size=30000
 allow_skip_frames=1
 slice_mode=dyn
 preset=veryfast
 profile=main

 Now call avcdec_open2:
 errNum = avcodec_open2 (encodingContext, codec, nullptr);
 Results: "Internal Error - this should not happen".

 ffmpeg version 4.1.4
 built on Windows 10
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/8036>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list