comparison data/fileio/OggVorbisFileReader.cpp @ 1381:ce08318aad83

Fixes to usage of fdopen, avoiding double-close in particular
author Chris Cannam
date Tue, 21 Feb 2017 21:08:14 +0000
parents 1c9bbbb6116a
children 70e172e6cc59
comparison
equal deleted inserted replaced
1380:bd1eb56df8d5 1381:ce08318aad83
76 return; 76 return;
77 } 77 }
78 78
79 m_fileSize = m_qfile->size(); 79 m_fileSize = m_qfile->size();
80 80
81 m_ffile = fdopen(dup(m_qfile->handle()), "r"); 81 m_ffile = fdopen(dup(m_qfile->handle()), "rb");
82 if (!m_ffile) { 82 if (!m_ffile) {
83 m_error = QString("Failed to open file pointer for file %1").arg(m_path); 83 m_error = QString("Failed to open file pointer for file %1").arg(m_path);
84 SVDEBUG << "OggVorbisFileReader: " << m_error << endl; 84 SVDEBUG << "OggVorbisFileReader: " << m_error << endl;
85 delete m_qfile; 85 delete m_qfile;
86 m_qfile = 0; 86 m_qfile = 0;