After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 592459 - info.print_info() uses info.tags.pop() to get values, but pop is destructive, so calling print_info twice can return different results
info.print_info() uses info.tags.pop() to get values, but pop is destructive,...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-python
0.10.x
Other All
: Normal minor
: 0.10.18
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-08-20 13:30 UTC by teh
Modified: 2010-01-18 14:00 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description teh 2009-08-20 13:30:17 UTC
def print_info(self):
        """prints out the information on the given file"""
        if not self.finished:
            return
        if not self.mimetype:
            print "Unknown media type"
            return
        print "Mime Type :\t", self.mimetype
        if not self.is_video and not self.is_audio:
            return
        print "Length :\t", self._time_to_string(max(self.audiolength, 
self.videolength))
        print "\tAudio:", self._time_to_string(self.audiolength), "\tVideo:
", self._time_to_string(self.videolength)
        if self.is_video and self.videorate:
            print "Video :"
            print "\t%d x %d @ %d/%d fps" % (self.videowidth,
                                            self.videoheight,
                                            self.videorate.num, self.videorate.denom
)
            if self.tags.has_key("video-codec"):
                print "\tCodec :", self.tags.pop("video-codec")
Comment 1 Thiago Sousa Santos 2010-01-18 14:00:29 UTC
Module: gst-python
Branch: master
Commit: 64e9d7f25b15e085ba0de6081d0c325a0d5facba
URL:    http://cgit.freedesktop.org/gstreamer/gst-python/commit/?id=64e9d7f25b15e085ba0de6081d0c325a0d5facba

Author: Thiago Santos <thiago.sousa.santos@collabora.co.uk>
Date:   Mon Jan 18 09:06:28 2010 -0300

python: Do not pop tags in discoverer.py

Do not use pop on dicts because it destroys the tags info.

Fixes #592459