Do not return a probe score from set_codec_from_probe_data() if the codec was ignored.

This is a workaround for the issue that stream probing can use
the score of another codec type for mpeg stream autodetection.
Fixes ticket #3821.
pull/80/head
Carl Eugen Hoyos 11 years ago
parent 5b12b4fc4b
commit ef17a0c7ba
  1. 4
      libavformat/utils.c

@ -278,11 +278,11 @@ static int set_codec_from_probe_data(AVFormatContext *s, AVStream *st,
if (!strcmp(fmt->name, fmt_id_type[i].name)) {
st->codec->codec_id = fmt_id_type[i].id;
st->codec->codec_type = fmt_id_type[i].type;
break;
return score;
}
}
}
return score;
return 0;
}
/************************************************************/

Loading…
Cancel
Save