Commit 2a8f659e authored by François Grisez's avatar François Grisez

Fix crash in MKVPlayer

Avoid crashing when frames or samples are send to a not connected output pin
parent 17dfcb5f
......@@ -2306,10 +2306,10 @@ static void player_process(MSFilter *f) {
obj->time += f->ticker->interval;
while(!eof && matroska_block_get_timestamp(&obj->file) < obj->time) {
int trackNum;
mblk_t *frame;
mblk_t *frame = NULL;
trackNum = matroska_block_get_track_num(&obj->file);
for(i=0; i < f->desc->noutputs && obj->trackNumList[i] != trackNum; i++);
if(i < f->desc->noutputs) {
if(i < f->desc->noutputs && f->outputs[i] != NULL) {
const uint8_t *codecPrivateData = NULL;
size_t codecPrivateSize = 0;
frame = matroska_block_read_frame(&obj->file, &codecPrivateData, &codecPrivateSize);
......
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