Replace direct use of RC4 by stream cipher abstraction.
[paraslash.git] / aft.c
diff --git a/aft.c b/aft.c
index 9f39d705620ee5b3b0e5e784b099730b078350e9..3b2f9172e56785292323e76c85a9f44e574186f5 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -8,7 +8,6 @@
 
 #include <regex.h>
 #include <dirent.h> /* readdir() */
-#include <openssl/rc4.h>
 #include <sys/mman.h>
 #include <fnmatch.h>
 #include <sys/shm.h>
@@ -1124,6 +1123,7 @@ int open_and_update_audio_file(struct osl_row *aft_row, long score,
        new_afsi.last_played = time(NULL);
        save_afsi(&new_afsi, &afsi_obj); /* in-place update */
 
+       afd->audio_format_id = old_afsi.audio_format_id;
        load_chunk_table(&afd->afhi, chunk_table_obj.data);
        ret = make_status_items(afd, &old_afsi, path, score, file_hash);
        if (ret < 0)
@@ -1135,6 +1135,8 @@ int open_and_update_audio_file(struct osl_row *aft_row, long score,
 err:
        free(afd->afhi.chunk_table);
        osl_close_disk_object(&chunk_table_obj);
+       if (ret < 0)
+               PARA_ERROR_LOG("%s: %s\n", path, para_strerror(-ret));
        return ret;
 }