Ensure filters are only applied to repeatable Streams.

This commit is contained in:
Vreixo Formoso 2008-03-01 17:12:27 +01:00
parent b3ef67feb6
commit 31a92bd8bd
1 changed files with 6 additions and 0 deletions

View File

@ -33,6 +33,12 @@ int iso_file_add_filter(IsoFile *file, FilterContext *filter, int flag)
}
original = file->stream;
if (!iso_stream_is_repeatable(original)) {
/* TODO use custom error */
return ISO_WRONG_ARG_VALUE;
}
ret = filter->get_filter(filter, original, &filtered);
if (ret < 0) {
return ret;