Commit b40f5c53 authored by François Grisez's avatar François Grisez

MediaCodecDecoder: prevent frames from being given to the decoder while...

MediaCodecDecoder: prevent frames from being given to the decoder while parameter sets hasn't been given yet.
parent 7cb43670
......@@ -77,7 +77,7 @@ bool MediaCodecDecoder::feed(MSQueue *encodedFrame, uint64_t timestamp) {
_psStore->acknowlege();
}
if (_needParameters) {
if (_needParameters && _psStore->psGatheringCompleted()) {
MSQueue parameters;
ms_queue_init(&parameters);
_psStore->fetchAllPs(&parameters);
......@@ -87,6 +87,11 @@ bool MediaCodecDecoder::feed(MSQueue *encodedFrame, uint64_t timestamp) {
}
}
if (_needParameters) {
ms_error("MediaCodecDecoder: missing parameter sets");
goto clean;
}
if (_needKeyFrame) {
if (!isKeyFrame(encodedFrame)) {
ms_error("MediaCodecDecoder: waiting for key frame.");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment