Skip to main content

 none
Where to report an issue inside WMF RRS feed

  • Question

  • Hi,

    There's an issue during stopping of playback of certain video file. IMFMediaSession::Shutdown() hangs.

    Here is the callstack:

    ntdll.dll!_RtlAcquireSRWLockExclusive@4() Unknown
    mfcore.dll!CComRWLock::LockExclusive(void) Unknown
    mfcore.dll!CMFMediaProcessor::Shutdown() Unknown
    mfcore.dll!CMediaSession::InternalShutdown() Unknown
    mfcore.dll!CMediaSession::Shutdown() Unknown
    wmfengined.dll!MFPlayerSession::close() Line 134
    wmfengined.dll!MFPlayerService::~MFPlayerService() Line 70
    wmfengined.dll!MFPlayerService::`scalar deleting destructor'(unsigned int) wmfengined.dll!WMFServicePlugin::release(QMediaService * service) Line 93 Qt5Multimediad.dll!QPluginServiceProvider::releaseService(QMediaService * service) Line 450 Qt5Multimediad.dll!QMediaPlayer::~QMediaPlayer() Line 677 ...

    Where can I report the issue with attached video file and sample to reproduce the hang?


    Tuesday, November 19, 2019 2:58 PM

All replies

  • I am afraid this call stack alone is insufficient. Perhaps you could capture a minidump file and add some details. It might be still not a MF issue after all. You can post here and via Feedback hub, or contact support directly via standard communication methods. It's hardly any other method.

    http://alax.info/blog/tag/directshow

    Tuesday, November 19, 2019 9:08 PM
  • Hi,

    Thanks for posting here.

    As @Roman said, If you want to report a BUG. You can post it in Feedback Hub.

    And, you can also post your reproducible sample and video file here, we will confirm if the issue is a bug, or something else.
    If it is confirmed as a bug, we will contact the relevant internal engineer to follow up and fix it.

    Best Regards,

    Drake


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, November 20, 2019 2:00 AM
    Moderator
  • Hi,

    Here is the sample with test video file inside:
    https://drive.google.com/open?id=1f5FpzDWYayhni9du4V8rw2Zzg_RMedVS

    I took SimplePlay sample from
    https://github.com/microsoft/Windows-classic-samples/tree/master/Samples/Win7Samples/multimedia/mediafoundation/SimplePlay

    Compile, run, use File/Open File, choose test.mp4 file from archive. Playback starts, nothing is displayed, close the window.
    As the result window hangs. If you break application in Visual Studio, you'll be on the same RW lock as I posted above:

    ntdll.dll!_NtWaitForAlertByThreadId@8() Unknown
    ntdll.dll!_RtlAcquireSRWLockExclusive@4() Unknown
    mfcore.dll!CComRWLock::LockExclusive(void) Unknown
    mfcore.dll!CMFMediaProcessor::GetService() Unknown
    mfcore.dll!CMediaSessionGetServiceImp::GetService() Unknown
    mfcore.dll!CMediaSession::GetService() Unknown
    mfcore.dll!_MFGetService@16() Unknown
    MFPlay.dll!CMFPInnerPlayer::Shutdown(void) Unknown
    MFPlay.dll!CMFPOuterPlayer::Shutdown(void) Unknown
    SimplePlay.exe!OnClose(HWND__ * __formal) Line 237 C++
    SimplePlay.exe!WindowProc(HWND__ * hwnd, unsigned int uMsg, unsigned int wParam, long lParam) Line 163 C++
    ...

    test.mp4 somehow breaks rendering pipeline and Media Foundation is unable to shutdown it.

    Thursday, November 21, 2019 12:25 PM
  • Hi,

    I can reproduce this issue with your video file sample, this maybe a potential issue, I will report it internally.  And  I have also help to create an issue here.

    https://github.com/microsoft/Windows-classic-samples/issues/107

    I will reply here if there is any update.

    Best Regards,

    Drake Wu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, November 25, 2019 9:00 AM
    Moderator
  • Hi,

    Do you mind sharing how do you get the test.mp4 file, which doesn't even play anything in Movie&TV app? And the same behavior(hang on) in Windows Media Player.

    Best Regards,

    Drake Wu


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, December 4, 2019 6:11 AM
    Moderator
  • Hi,

    Unfortunately I don't know, the file was received from one of our users and I don't have information how to connect to him.

    The file is played by ffmpeg based players, e.g. Media Player Home Cinema.

    Thursday, December 5, 2019 8:54 AM
  • This sample contains APIs that are deprecated. Deprecated APIs may be removed from a future version of the OS. Anyone using these samples should immediately move away from these APIs to supported APIs. The current replacement for the IMFPMediaPlayer APIs is the Media Session APIs. https://docs.microsoft.com/en-us/windows/win32/medfound/media-session

    Are you able to reproduce this issue using the Media Session APIs? Have you contacted the Qt5Multimediad owners and reported this? If you are an owner of the Qt5Multimediad and the code is using the Media Session APIs please open a dev support ticket with Microsoft: https://support.microsoft.com/en-us/hub/4343728/support-for-business When prompted select Developer Tools and Windows SDK.

    -James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/


    Thursday, December 5, 2019 7:57 PM
  • > Are you able to reproduce this issue using the Media Session APIs?

    Yeah, in our Qt based project, see the first message. The same issue with media session API which is used by QMediaPlayer.

    Have you contacted the Qt5Multimediad owners and reported this?

    No. I reproduced the same error on the trivial sample so decided that the issue was in Media Foundation itself. BTW this file isn't played by builtin Windows player, see message by Drake Wu above. So it's not an issue of Qt framework. It's definitely WMF issue.


    Friday, December 6, 2019 12:15 PM
  • Your file is ~8k (7680x4320). The max HW accelerated resolution of the h.264 codec on Windows is 4096×2304 pixels. The behavior of the codec playing anything over this resolution is undefined. Try reencoding the video to 4096×2304 and see if the issue still occurs. You could also try configuring the h.264 codec to use software only decoding but I don't believe that you will get real-time playback of 8k using the CPU only. 

    PS The video doesn't play in TopoEdit. This is the baseline implementation for the Media Session on Windows. 

    Reference:

    https://docs.microsoft.com/en-us/windows/win32/medfound/h-264-video-decoder



    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Saturday, December 7, 2019 1:05 AM
  • 8k!? No, it's just 30x30 pixels! Maybe decoder gets invalid size from upper layers?

    General
    Complete name                  : test.mp4
    Format                         : MPEG-4
    Format profile                 : Base Media / Version 2
    Codec ID                       : mp42 (mp42/mp41)
    File size                      : 723 KiB
    Duration                       : 15 s 560 ms
    Overall bit rate mode          : Variable
    Overall bit rate               : 381 kb/s
    Encoded date                   : UTC 2019-11-13 13:15:27
    Tagged date                    : UTC 2019-11-13 13:15:28
    ©TIM                           : 00:00:00:00
    ©TSC                           : 25
    ©TSZ                           : 1

    Video
    ID                             : 1
    Format                         : AVC
    Format/Info                    : Advanced Video Codec
    Format profile                 : Main@L3.1
    Format settings, CABAC         : Yes
    Format settings, RefFrames     : 4 frames
    Codec ID                       : avc1
    Codec ID/Info                  : Advanced Video Coding
    Duration                       : 15 s 560 ms
    Bit rate                       : 30.9 kb/s
    Width                          : 30 pixels
    Height                         : 30 pixels
    Display aspect ratio           : 1.000
    Frame rate mode                : Constant
    Frame rate                     : 25.000 FPS
    Standard                       : PAL
    Color space                    : YUV
    Chroma subsampling             : 4:2:0
    Bit depth                      : 8 bits
    Scan type                      : Progressive
    Bits/(Pixel*Frame)             : 1.376
    Stream size                    : 58.8 KiB (8%)
    Language                       : English
    Encoded date                   : UTC 2019-11-13 13:15:27
    Tagged date                    : UTC 2019-11-13 13:15:27
    Color range                    : Limited
    Color primaries                : BT.601 NTSC
    Transfer characteristics       : BT.601
    Matrix coefficients            : BT.601

    Audio
    ID                             : 2
    Format                         : AAC
    Format/Info                    : Advanced Audio Codec
    Format profile                 : LC
    Codec ID                       : 40
    Duration                       : 15 s 560 ms
    Source duration                : 15 s 595 ms
    Bit rate mode                  : Variable
    Bit rate                       : 317 kb/s
    Maximum bit rate               : 422 kb/s
    Channel(s)                     : 2 channels
    Channel positions              : Front: L R
    Sampling rate                  : 48.0 kHz
    Frame rate                     : 46.875 FPS (1024 SPF)
    Compression mode               : Lossy
    Stream size                    : 603 KiB (83%)
    Source stream size             : 604 KiB (84%)
    Language                       : English
    Encoded date                   : UTC 2019-11-13 13:15:27
    Tagged date                    : UTC 2019-11-13 13:15:27

    Monday, December 9, 2019 8:46 AM