0
votes

I have a little problem with my Qt program.
There is a function which downloads a mp3 file (using QFile) and is called each time new datas are available to be written.
Once these datas have been written, I 'd like to construct a TagLib::FileRef variable, to read the bitrate of the file. The problem is this variable is always null, because the file is already opened.
How can I process, without having to close and re-open the file each time ?

Thanks

1
Downgrading to taglib 1.7.2 have fixed the problem... - Christophe

1 Answers

1
votes

The data might not be written immediately by QFile to disk, so another file descriptor open on the same file wouldn't be able to read it.

Try to call QFile::flush() after each write.