Skip to content
Snippets Groups Projects
Commit dc71d87c authored by Sébastien Blin's avatar Sébastien Blin Committed by Mohamed Chibani
Browse files

media_encoder: avoid segfault on nullptr

Caught by ut_media_encoder:

READ of size 8 at 0x602000029818 thread T0
    #0 0x5649e914d6e0 in jami::MediaEncoder::send(AVPacket&, int) media/media_encoder.cpp:504
    #1 0x5649e914d05c in jami::MediaEncoder::encode(AVFrame*, int) media/media_encoder.cpp:480
    #2 0x5649e8cac119 in jami::test::MediaEncoderTest::testMultiStream() media/test_media_encoder.cpp:183

outputCtx_->nb_streams can be different from encoders.size(), and if
not checked can lead to a crash

Change-Id: I3c0217ec3e1d50950bf46989e0dd6797fee8972e
parent feb26e47
Branches
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment