You need to sign in or sign up before continuing.
Commit 063affb0 authored by Warren Dukes's avatar Warren Dukes

we no longer need to block signals in tag.c, since update is now done

in a seperate process git-svn-id: https://svn.musicpd.org/mpd/trunk@696 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent 0a326a43
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include "tag.h" #include "tag.h"
#include "path.h" #include "path.h"
#include "myfprintf.h" #include "myfprintf.h"
#include "sig_handlers.h"
#include "mp3_decode.h" #include "mp3_decode.h"
#include "audiofile_decode.h" #include "audiofile_decode.h"
#include "mp4_decode.h" #include "mp4_decode.h"
...@@ -90,18 +89,15 @@ MpdTag * id3Dup(char * utf8filename) { ...@@ -90,18 +89,15 @@ MpdTag * id3Dup(char * utf8filename) {
struct id3_tag * tag; struct id3_tag * tag;
char * str; char * str;
blockSignals();
file = id3_file_open(rmp2amp(utf8ToFsCharset(utf8filename)), file = id3_file_open(rmp2amp(utf8ToFsCharset(utf8filename)),
ID3_FILE_MODE_READONLY); ID3_FILE_MODE_READONLY);
if(!file) { if(!file) {
unblockSignals();
return NULL; return NULL;
} }
tag = id3_file_tag(file); tag = id3_file_tag(file);
if(!tag) { if(!tag) {
id3_file_close(file); id3_file_close(file);
unblockSignals();
return NULL; return NULL;
} }
...@@ -135,7 +131,6 @@ MpdTag * id3Dup(char * utf8filename) { ...@@ -135,7 +131,6 @@ MpdTag * id3Dup(char * utf8filename) {
id3_file_close(file); id3_file_close(file);
unblockSignals();
#endif #endif
return ret; return ret;
} }
...@@ -177,8 +172,6 @@ MpdTag * aacTagDup(char * utf8file) { ...@@ -177,8 +172,6 @@ MpdTag * aacTagDup(char * utf8file) {
MpdTag * ret = NULL; MpdTag * ret = NULL;
int time; int time;
blockSignals();
time = getAacTotalTime(rmp2amp(utf8ToFsCharset(utf8file))); time = getAacTotalTime(rmp2amp(utf8ToFsCharset(utf8file)));
if(time>=0) { if(time>=0) {
...@@ -186,8 +179,6 @@ MpdTag * aacTagDup(char * utf8file) { ...@@ -186,8 +179,6 @@ MpdTag * aacTagDup(char * utf8file) {
ret->time = time; ret->time = time;
} }
unblockSignals();
return ret; return ret;
} }
...@@ -202,11 +193,8 @@ MpdTag * mp4DataDup(char * utf8file, int * mp4MetadataFound) { ...@@ -202,11 +193,8 @@ MpdTag * mp4DataDup(char * utf8file, int * mp4MetadataFound) {
*mp4MetadataFound = 0; *mp4MetadataFound = 0;
blockSignals();
fh = fopen(rmp2amp(utf8ToFsCharset(utf8file)),"r"); fh = fopen(rmp2amp(utf8ToFsCharset(utf8file)),"r");
if(!fh) { if(!fh) {
unblockSignals();
return NULL; return NULL;
} }
...@@ -219,7 +207,6 @@ MpdTag * mp4DataDup(char * utf8file, int * mp4MetadataFound) { ...@@ -219,7 +207,6 @@ MpdTag * mp4DataDup(char * utf8file, int * mp4MetadataFound) {
if(!mp4fh) { if(!mp4fh) {
free(cb); free(cb);
fclose(fh); fclose(fh);
unblockSignals();
return NULL; return NULL;
} }
...@@ -228,7 +215,6 @@ MpdTag * mp4DataDup(char * utf8file, int * mp4MetadataFound) { ...@@ -228,7 +215,6 @@ MpdTag * mp4DataDup(char * utf8file, int * mp4MetadataFound) {
mp4ff_close(mp4fh); mp4ff_close(mp4fh);
fclose(fh); fclose(fh);
free(cb); free(cb);
unblockSignals();
return NULL; return NULL;
} }
...@@ -240,7 +226,6 @@ MpdTag * mp4DataDup(char * utf8file, int * mp4MetadataFound) { ...@@ -240,7 +226,6 @@ MpdTag * mp4DataDup(char * utf8file, int * mp4MetadataFound) {
fclose(fh); fclose(fh);
free(cb); free(cb);
freeMpdTag(ret); freeMpdTag(ret);
unblockSignals();
return NULL; return NULL;
} }
ret->time = ((float)time)/scale+0.5; ret->time = ((float)time)/scale+0.5;
...@@ -264,7 +249,6 @@ MpdTag * mp4DataDup(char * utf8file, int * mp4MetadataFound) { ...@@ -264,7 +249,6 @@ MpdTag * mp4DataDup(char * utf8file, int * mp4MetadataFound) {
mp4ff_close(mp4fh); mp4ff_close(mp4fh);
fclose(fh); fclose(fh);
free(cb); free(cb);
unblockSignals();
return ret; return ret;
} }
...@@ -300,9 +284,7 @@ MpdTag * oggTagDup(char * utf8file) { ...@@ -300,9 +284,7 @@ MpdTag * oggTagDup(char * utf8file) {
while(!(fp = fopen(rmp2amp(utf8ToFsCharset(utf8file)),"r")) while(!(fp = fopen(rmp2amp(utf8ToFsCharset(utf8file)),"r"))
&& errno==EINTR); && errno==EINTR);
if(!fp) return NULL; if(!fp) return NULL;
blockSignals();
if(ov_open(fp,&vf,NULL,0)<0) { if(ov_open(fp,&vf,NULL,0)<0) {
unblockSignals();
while(fclose(fp) && errno==EINTR); while(fclose(fp) && errno==EINTR);
return NULL; return NULL;
} }
...@@ -347,7 +329,6 @@ MpdTag * oggTagDup(char * utf8file) { ...@@ -347,7 +329,6 @@ MpdTag * oggTagDup(char * utf8file) {
ov_clear(&vf); ov_clear(&vf);
unblockSignals();
return ret; return ret;
} }
#endif #endif
...@@ -362,11 +343,9 @@ MpdTag * flacMetadataDup(char * utf8file, int * vorbisCommentFound) { ...@@ -362,11 +343,9 @@ MpdTag * flacMetadataDup(char * utf8file, int * vorbisCommentFound) {
*vorbisCommentFound = 0; *vorbisCommentFound = 0;
blockSignals();
it = FLAC__metadata_simple_iterator_new(); it = FLAC__metadata_simple_iterator_new();
if(!FLAC__metadata_simple_iterator_init(it,rmp2amp(utf8ToFsCharset(utf8file)),1,0)) { if(!FLAC__metadata_simple_iterator_init(it,rmp2amp(utf8ToFsCharset(utf8file)),1,0)) {
FLAC__metadata_simple_iterator_delete(it); FLAC__metadata_simple_iterator_delete(it);
unblockSignals();
return ret; return ret;
} }
...@@ -444,7 +423,6 @@ MpdTag * flacMetadataDup(char * utf8file, int * vorbisCommentFound) { ...@@ -444,7 +423,6 @@ MpdTag * flacMetadataDup(char * utf8file, int * vorbisCommentFound) {
} while(FLAC__metadata_simple_iterator_next(it)); } while(FLAC__metadata_simple_iterator_next(it));
FLAC__metadata_simple_iterator_delete(it); FLAC__metadata_simple_iterator_delete(it);
unblockSignals();
return ret; return ret;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment