Hello community, here is the log from the commit of package exiv2 for openSUSE:Factory checked in at 2015-05-28 09:04:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/exiv2 (Old) and /work/SRC/openSUSE:Factory/.exiv2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "exiv2" Changes: -------- --- /work/SRC/openSUSE:Factory/exiv2/exiv2.changes 2015-05-20 23:47:02.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.exiv2.new/exiv2.changes 2015-05-28 09:04:35.000000000 +0200 @@ -1,0 +2,5 @@ +Sun May 24 13:29:40 UTC 2015 - [email protected] + +- add fix-video-timescale-handling.patch: Fix crash when scanning mp4 videos. + +------------------------------------------------------------------- New: ---- fix-video-timescale-handling.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ exiv2.spec ++++++ --- /var/tmp/diff_new_pack.VmDEzP/_old 2015-05-28 09:04:36.000000000 +0200 +++ /var/tmp/diff_new_pack.VmDEzP/_new 2015-05-28 09:04:36.000000000 +0200 @@ -31,6 +31,8 @@ # PATCH-FIX-UPSTREAM fix-overflow-in-info-tags-r3264.patch [email protected] -- fix overflow in info tags from svn rev 3264, also fixes kde#340373 Patch2: fix-overflow-in-info-tags-r3264.patch Patch3: parallel-build-dep.patch +# PATCH-FIX-UPSTREAM fix-video-timescale-handling.patch [email protected] -- fix crash in mp4 metadata handling +Patch4: fix-video-timescale-handling.patch BuildRequires: doxygen BuildRequires: fdupes BuildRequires: gcc-c++ @@ -74,6 +76,7 @@ %patch1 -p1 %patch2 -p1 %patch3 +%patch4 -p1 %build export CXXFLAGS="%optflags $(getconf LFS_CFLAGS)" ++++++ fix-video-timescale-handling.patch ++++++ This patch fixes a number of exiv2 bugs when handling video metadata, most mentioned in http://dev.exiv2.org/issues/999. This fixes a digikam startup crash when scanning mp4 videos encoded by ffmpeg. Changes extracted from http://dev.exiv2.org/projects/exiv2/repository/, revisions r3265, r3390 and r3537. Index: exiv2-0.24/src/quicktimevideo.cpp =================================================================== --- exiv2-0.24.orig/src/quicktimevideo.cpp +++ exiv2-0.24/src/quicktimevideo.cpp @@ -1459,9 +1459,9 @@ namespace Exiv2 { break; case MediaDuration: if(currentStream_ == Video) - xmpData_["Xmp.video.MediaDuration"] = returnBufValue(buf)/time_scale; + xmpData_["Xmp.video.MediaDuration"] = time_scale ? returnBufValue(buf)/time_scale : 0 ; else if (currentStream_ == Audio) - xmpData_["Xmp.audio.MediaDuration"] = returnBufValue(buf)/time_scale; + xmpData_["Xmp.audio.MediaDuration"] = time_scale ? returnBufValue(buf)/time_scale : 0; break; case MediaLanguageCode: if(currentStream_ == Video) @@ -1515,9 +1515,9 @@ namespace Exiv2 { break; case TrackDuration: if(currentStream_ == Video) - xmpData_["Xmp.video.TrackDuration"] = returnBufValue(buf)/timeScale_; + xmpData_["Xmp.video.TrackDuration"] = timeScale_ ? returnBufValue(buf)/timeScale_ : 0; else if(currentStream_ == Audio) - xmpData_["Xmp.audio.TrackDuration"] = returnBufValue(buf)/timeScale_; + xmpData_["Xmp.audio.TrackDuration"] = timeScale_ ? returnBufValue(buf)/timeScale_ : 0; break; case TrackLayer: if(currentStream_ == Video) @@ -1573,6 +1573,7 @@ namespace Exiv2 { xmpData_["Xmp.video.TimeScale"] = returnBufValue(buf); timeScale_ = returnBufValue(buf); break; case Duration: + if(timeScale_ != 0) // To prevent division by zero xmpData_["Xmp.video.Duration"] = returnBufValue(buf) * 1000 / timeScale_; break; case PreferredRate: xmpData_["Xmp.video.PreferredRate"] = returnBufValue(buf, 2) + ((buf.pData_[2] * 256 + buf.pData_[3]) * 0.01); break;
