X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=fecdec_filter.c;h=ca7c7dd3522eae673469baee46e7a7471e7fac72;hp=08a0ad0b19befe22befbff26112358b9c6685093;hb=c42e45c5ae4b150faaad0c30e53ff323cfe3787a;hpb=63c513602a6b6a97cdced053beea0b2d07a9f984 diff --git a/fecdec_filter.c b/fecdec_filter.c index 08a0ad0b..ca7c7dd3 100644 --- a/fecdec_filter.c +++ b/fecdec_filter.c @@ -110,7 +110,9 @@ static void clear_group(struct fecdec_group *fg) fg->idx[i] = -1; } free(fg->data); + fg->data = NULL; free(fg->idx); + fg->idx = NULL; fg->num_slices = 0; memset(&fg->h, 0, sizeof(struct fec_header)); fg->num_received_slices = 0; @@ -243,10 +245,21 @@ static int add_slice(char *buf, struct fecdec_group *fg) return 1; } +/** + * The different states of a complete FEC group. + * + * Even if a FEC group has been received successfully, it probably can not be + * used right away because some streams (ogg, wma) need to receive an audio + * file header before decoding can start. + */ enum fec_group_usability { + /** Drop the group (because we did not receive the header yet). */ FEC_GROUP_UNUSABLE, + /** Use all data in the group. */ FEC_GROUP_USABLE, + /** Use the group, but drop its audio file header. */ FEC_GROUP_USABLE_SKIP_HEADER, + /** Use the group, including its header. */ FEC_GROUP_USABLE_WITH_HEADER };