Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in onQueueAccessUnit #2

Open
aniket-cuelogic opened this issue Nov 17, 2014 · 1 comment
Open

Crash in onQueueAccessUnit #2

aniket-cuelogic opened this issue Nov 17, 2014 · 1 comment

Comments

@aniket-cuelogic
Copy link

I'm working on a HDMI dongle running 4.4.2. I'm getting following error.

I have put more debug logs to check. And what I see is that, AMessage of accessunit with track_no 0, is not getting a format in the first message. So It doesn't get registered in DirectRenderer, and hence it crashes.

Can you point to cause of such a problem? (I'm using Nexus 7 2013 as a source) Thanks a lot !

D/Mira_for_You_JNI( 1738): Source Addr[192.168.49.226] Port[7236]
I/NetworkSession( 1738): connecting socket 54 to 192.168.49.226:7236
I/WifiDisplaySink( 1738): We're now connected.
I/RTPReceiver( 1738): connectUDPSession RTP successful.
I/RTPReceiver( 1738): connectUDPSession RTCP successful.
I/WifiDisplaySink( 1738): MediaReceiver initialization completed w/ err 0
I/avc_utils( 1738): found AVC codec config (1280 x 720, Baseline-profile level 3.1)
I/MediaCodecList( 1738): register mediacode *****************
I/OMXClient( 1738): Using client-side OMX mux.
I/ ( 1738): new RKOMXPlugin
D/ACodec ( 1738): MEDIA_MIMETYPE_AUDIO_AAC sampleRate 48000 wifidisplay_flag 0 info >68bad878
F/DirectRenderer( 1738): frameworks/av/media/libstagefright/wifi->display/sink/DirectRenderer.cpp:559 CHECK(mDecoderContext[trackIndex] != NULL) failed.

@gshu001
Copy link

gshu001 commented Dec 18, 2014

Hi ,
please modify MediaReceiver.cpp file:

if (!(mFormatKnownMask & (1ul << trackIndex))) {
    sp<MetaData> meta = source->getFormat();
    CHECK(meta != NULL);

    CHECK_EQ((status_t)OK, convertMetaDataToMessage(meta, &format));

    // mFormatKnownMask |= 1ul << trackIndex;     //delete by andy
}

status_t finalResult;
while (source->hasBufferAvailable(&finalResult)) {
    sp<ABuffer> accessUnit;
    status_t err = source->dequeueAccessUnit(&accessUnit);
    if (err == OK) {
        mFormatKnownMask |= 1ul << trackIndex;    //modify by andy
        postAccessUnit(trackIndex, accessUnit, format);
        format.clear();
    } else if (err != INFO_DISCONTINUITY) {
        notifyError(err);
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants