X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=mp3dec_filter.c;h=73ce0e502c9181c1d289cae48a638a5965248eea;hp=a6a628ec2ee939b4d9bb86b171d51d0ec843f8d6;hb=9facffb38faa01da0d1ba9574f9cc1c47b1deb2e;hpb=d0f36435b0f81368a778fda33f3a7df86830f5ac diff --git a/mp3dec_filter.c b/mp3dec_filter.c index a6a628ec..73ce0e50 100644 --- a/mp3dec_filter.c +++ b/mp3dec_filter.c @@ -198,7 +198,7 @@ next_buffer: iqs = btr_get_input_queue_size(btrn); if (need_bad_data_delay(pmd, iqs)) return; - ret = btr_node_status(btrn, fn->min_iqs); + ret = btr_node_status(btrn, fn->min_iqs, BTR_NT_INTERNAL); if (ret < 0) goto err; if (ret == 0) @@ -228,7 +228,7 @@ next_frame: pmd->channels = MAD_NCHANNELS(&pmd->frame.header); ret = mad_frame_decode(&pmd->frame, &pmd->stream); if (ret != 0) { - PARA_CRIT_LOG("frame decode: %d\n", ret); + PARA_INFO_LOG("frame decode: %s\n", mad_stream_errorstr(&pmd->stream)); used = used_mad_buffer_bytes(&pmd->stream, len); ret = handle_decode_error(pmd, used); btr_consume(btrn, used); @@ -257,9 +257,8 @@ next_frame: goto next_frame; err: assert(ret < 0); - mp3dec_close(fn); t->error = ret; - btr_del_node(btrn); + btr_remove_node(btrn); } static void mp3dec_open(struct filter_node *fn) @@ -318,6 +317,11 @@ static int mp3dec_execute(struct btr_node *btrn, const char *cmd, char **result) } return -ERRNO_TO_PARA_ERROR(ENOTSUP); } + +static void mp3dec_free_config(void *conf) +{ + mp3dec_cmdline_parser_free(conf); +} /** * The init function of the mp3dec filter. * @@ -334,6 +338,7 @@ void mp3dec_filter_init(struct filter *f) f->convert = mp3dec; f->close = mp3dec_close; f->parse_config = mp3dec_parse_config; + f->free_config = mp3dec_free_config; f->pre_select = generic_filter_pre_select; f->post_select = mp3dec_post_select; f->execute = mp3dec_execute;