]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - aft.c
Fix grab client resume.
[paraslash.git] / aft.c
diff --git a/aft.c b/aft.c
index 9f39d705620ee5b3b0e5e784b099730b078350e9..b3dde1379997bb6f69647255d0ac53fb703fce09 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -1124,6 +1124,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 +1136,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;
 }