GNOME Bugzilla – Bug 744941
Wrong duration label breaks seeking in EggPreview
Last modified: 2016-02-15 10:36:29 UTC
The track duration is always set to zero which breaks seeking.
Created attachment 297563 [details] [review] Fix duration label and seeking in EggPreview To get the track duration EggPreview was using GST_MESSAGE_DURATION which is deprecated and alway returns a duration of -1 rather than GST_MESSAGE_DURATION_CHANGED followed be querying playbin for the new duration. This meant that the track duration was always zero which broke seeking.
Created attachment 297568 [details] [review] Fix duration label and seeking in EggPreview Revised patch which checks to see if the duration has actually changed before updating it. To get the track duration EggPreview was checking for messages of type GST_MESSAGE_DURATION and then calling gst_message_parse_duration() which always returns a duration of -1. This meant that the track duration was always zero which broke seeking. It should check for messages of type GST_MESSAGE_DURATION_CHANGED and query playbin for the new duration instead.
Created attachment 321233 [details] [review] Fix duration detection in EggPlayPreview Updated commit message To get the track duration EggPlayPreview was checking for messages of type GST_MESSAGE_DURATION and then calling gst_message_parse_duration() which always returns a duration of -1. This meant that the track duration was always zero which broke seeking. It should check for messages of type GST_MESSAGE_DURATION_CHANGED and query playbin for the new duration instead.
Attachment 321233 [details] pushed as 72ccc5a - Fix duration detection in EggPlayPreview