[d3d11h264dec] Microsoft C++ exception: _com_error at memory location

Hi,

I just observed these annoying messages in Visual Studio and wonder whether it’s possible to remove such warnings by adding a patch to GStreamer.

Update: Confirmed that the problem is in d3d11h264dec. There are no repeated warnings in d3d12h264dec and nvh264dec.

To reproduce the issue, create a simple Visual Studio project with code below (main.c):

#include <gst/gst.h>

int main(int argc, char* argv[])
{
    gst_init(NULL, NULL);

    GstElement* pipeline = gst_parse_launch(
        "filesrc location=sintel_trailer-480p.mp4 ! qtdemux ! decodebin ! videoconvert ! autovideosink", NULL);
    if (!pipeline) {
        exit(-1);
    }
    GMainLoop* loop = g_main_loop_new(NULL, FALSE);
    gst_element_set_state(pipeline, GST_STATE_PLAYING);
    g_main_loop_run(loop);

    gst_deinit();
    return 0;
}

When the debugging is started, I can see that the program works fine, but there’s a new warning message created every few seconds, in Visual Studio’s output panel.

I guess that whenever a keyframe is reached, a new warning message is created.

My testing environment:

  • Windows 11 23H2 x86_64
  • Visual Studio 2019
  • GStreamer 1.24.12

Can you create an issue in gitlab with detailed steps how to reproduce the issue?

It’s safe to ignore the exception. This is a nvidia specific behavior that ID3D11VideoContext::DecoderBeginFrame() returns E_PENDING with _com_error() exception when GPU is busy and not ready to start decoding new frame yet.
Then GStreamer does retry it after 1ms sleep.

In any case, I do recommend d3d12 ones in upcoming 1.26 which were promoted to have higher rank than d3d11 ones.

1 Like

This problem only affects developers, according to seungha. I will work around by switching to d3d12 if possible.

I’m not sure whether it can be fixed in current architecture. If anyone notices this issue too, and wants to submit an issue on Gitlab, he can reference this post.

Here’s the testing environment, in more detail:

  • Windows 11 23H2 x86_64
  • Visual Studio 2019
  • GStreamer 1.24.12 x86_64
  • Hardware: AMD 6800H with Nvidia RTX3060 Laptop

Install the OS, Visual Studio, GStreamer on the given hardware platform, create a Visual Studio project with the given code, start debugging, and the warning messages will appear on the output panel.