Use QImage to load photo metadata instead of ffmpeg.

This commit is contained in:
codestation
2014-01-02 13:14:38 -04:30
parent e2768672e7
commit 960897ea2e
5 changed files with 7 additions and 21 deletions

View File

@@ -150,12 +150,12 @@ void CMAObject::loadVideoMetadata(const QString &path)
void CMAObject::loadPhotoMetadata(const QString &path)
{
AVDecoder decoder;
if(decoder.open(path)) {
decoder.getPictureMetadata(metadata);
} else {
metadata.data.photo.title = strdup(metadata.name);
QImage img;
if(img.load(path)) {
metadata.data.photo.tracks->data.track_photo.width = img.width();
metadata.data.photo.tracks->data.track_photo.height = img.height();
}
metadata.data.photo.title = strdup(metadata.name);
}
void CMAObject::initObject(const QFileInfo &file, int file_type)