Commit
faeabd31b4bea5c097acff4738a0626e3c84f1d9 (fecdec: Defer decoding until
the first slice of the second group arrives.) changed the fec decoder such that it does
not start to write the decoded output ASAP but waits until the next group starts.
This is generally a good idea, but the patch missed the fact that the first complete group
might be unusable in case of streams that carry an audio file header (currently only ogg
vorbis).
Fix this flaw by setting the completion status to GCS_FIRST_GROUP_COMPLETE only
if we received a complete group that is also usable.
return 1;
if (group_complete(fg)) {
if (pfd->completion_status == GCS_NO_COMPLETE_GROUP) {
+ enum fec_group_usability u = group_is_usable(fg, pfd);
+ assert(u != FEC_GROUP_USABLE_SKIP_HEADER);
+ if (u == FEC_GROUP_UNUSABLE)
+ return 1;
pfd->completion_status = GCS_FIRST_GROUP_COMPLETE;
pfd->first_complete_group = fg;
return 1;