Skip to content

[MacOS] AVPixelFormat crash #184

Open
@JulienDev

Description

@JulienDev

Describe the bug
I noticed a few crashes on MacOS related to AVPixelFormat. All MacOS versions are impacted and I'm using fvp 0.28.0 and mdk 0.3.0 with Flutter 3.24.3

Expected behavior
The app should not crash

Log
I can't reproduce on my Mac so I can share with you the Crashlytics stacktrace:

Crash : mdk.vdec0@0x700004c26000
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000000
Crashed: mdk.vdec0@0x700004c26000
0  mdk                            0xb3712 mdk::abi::ffmpeg::to(mdk::abi::VideoFormat&, AVPixelFormat) + 1724 (__hash_table:1724)
1  mdk                            0xb65a1 mdk::abi::ffmpeg::to(mdk::abi::VideoFrame&, AVFrame const*, AVRational const&) + 173 (VideoFrameGlue.cpp:173)
2  mdk                            0xc3486 mdk::abi::VideoDecoderFFmpegBase::from(AVFrame*) + 167 (VideoDecoderFFmpegBase.cpp:167)
3  mdk                            0xc3c59 mdk::abi::VideoDecoderAVCodec::from(AVFrame*) + 379 (VideoDecoderAVCodec.cpp:379)
4  mdk                            0xc3549 std::__1::__function::__func<mdk::abi::VideoDecoderFFmpegBase::decode(mdk::abi::Packet const&)::$_3, std::__1::allocator<mdk::abi::VideoDecoderFFmpegBase::decode(mdk::abi::Packet const&)::$_3>, double (AVFrame*)>::operator()(AVFrame*&&) + 60 (VideoFrame.h:60)
5  mdk                            0xbf70c mdk::abi::AVCoderBase::decodePacket(AVCodecContext*, mdk::abi::Packet const&, std::__1::function<double (AVFrame*)>&&) + 139 (AVCoderBase.cpp:139)
6  mdk                            0xc340e mdk::abi::VideoDecoderFFmpegBase::decode(mdk::abi::Packet const&) + 138 (VideoDecoderFFmpegBase.cpp:138)
7  mdk                            0x22cdd bool mdk::abi::FrameReaderImpl::decodeLoop<(mdk::abi::MediaType)0>(int, int) + 2500 (FrameReader.cpp:2500)
8  mdk                            0x1dfd2 void* std::__1::__thread_proxy[abi:nn180100]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, mdk::abi::FrameReaderImpl::startDecodeThread(mdk::abi::FrameReaderImpl::DecLoopState&, mdk::abi::MediaType, int)::$_0>>(void*) + 2732 (FrameReader.cpp:2732)
9  libsystem_pthread.dylib        0x64e1 _pthread_start + 125
10 libsystem_pthread.dylib        0x1f6b thread_start + 15
        

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions