Mercurial > hg > svcore
comparison data/fileio/QuickTimeFileReader.cpp @ 699:3b00c1650490
Fix incorrect length calculation in creating CFURL from non-ASCII file path
author | Chris Cannam |
---|---|
date | Wed, 17 Aug 2011 22:12:13 +0100 |
parents | 1424aa29ae95 |
children | e802e550a1f2 |
comparison
equal
deleted
inserted
replaced
693:682101331278 | 699:3b00c1650490 |
---|---|
87 | 87 |
88 // CFStringRef URLString = CFStringCreateWithCString | 88 // CFStringRef URLString = CFStringCreateWithCString |
89 // (0, m_path.toLocal8Bit().data(), 0); | 89 // (0, m_path.toLocal8Bit().data(), 0); |
90 | 90 |
91 | 91 |
92 QByteArray ba = m_path.toLocal8Bit(); | |
93 | |
92 CFURLRef url = CFURLCreateFromFileSystemRepresentation | 94 CFURLRef url = CFURLCreateFromFileSystemRepresentation |
93 (kCFAllocatorDefault, | 95 (kCFAllocatorDefault, |
94 (const UInt8 *)m_path.toLocal8Bit().data(), | 96 (const UInt8 *)ba.data(), |
95 (CFIndex)m_path.length(), | 97 (CFIndex)ba.length(), |
96 false); | 98 false); |
97 | 99 |
98 | 100 |
99 // m_d->err = QTNewDataReferenceFromURLCFString | 101 // m_d->err = QTNewDataReferenceFromURLCFString |
100 m_d->err = QTNewDataReferenceFromCFURL | 102 m_d->err = QTNewDataReferenceFromCFURL |