Unified · Split
| @@ -708,23 +708,27 @@ sox_format_handler_t const * sox_write_handler( · 707 unmodified lines | ||
| 708 | 708 | sox_format_handler_t const * handler; |
| 709 | 709 | if (filetype) { |
| 710 | 710 | if (!(handler = sox_find_format(filetype, sox_false))) { |
| 711 | − lsx_fail("no handler for given file type `%s'", filetype); | |
| 711 | + if (filetype1) | |
| 712 | + lsx_fail("no handler for given file type `%s'", filetype); | |
| 712 | 713 | return NULL; |
| 713 | 714 | } |
| 714 | 715 | } |
| 715 | 716 | else if (path) { |
| 716 | 717 | if (!(filetype = lsx_find_file_extension(path))) { |
| 717 | − lsx_fail("can't determine type of `%s'", path); | |
| 718 | + if (filetype1) | |
| 719 | + lsx_fail("can't determine type of `%s'", path); | |
| 718 | 720 | return NULL; |
| 719 | 721 | } |
| 720 | 722 | if (!(handler = sox_find_format(filetype, sox_true))) { |
| 721 | − lsx_fail("no handler for file extension `%s'", filetype); | |
| 723 | + if (filetype1) | |
| 724 | + lsx_fail("no handler for file extension `%s'", filetype); | |
| 722 | 725 | return NULL; |
| 723 | 726 | } |
| 724 | 727 | } |
| 725 | 728 | else return NULL; |
| 726 | 729 | if (!handler->startwrite && !handler->write) { |
| 727 | − lsx_fail("file type `%s' isn't writeable", filetype); | |
| 730 | + if (filetype1) | |
| 731 | + lsx_fail("file type `%s' isn't writeable", filetype); | |
| 728 | 732 | return NULL; |
| 729 | 733 | } |
| 730 | 734 | if (filetype1) |