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 790334 - avwait: Deserialised timecodes set after caps event now get correct framerate
avwait: Deserialised timecodes set after caps event now get correct framerate
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other All
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-11-14 16:16 UTC by Vivia Nikolaidou
Modified: 2017-11-14 16:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
avwait: Deserialised timecodes set after caps event now get correct framerate (2.27 KB, patch)
2017-11-14 16:16 UTC, Vivia Nikolaidou
none Details | Review
avwait: Deserialised timecodes set after caps event now get correct framerate (3.66 KB, patch)
2017-11-14 16:25 UTC, Vivia Nikolaidou
none Details | Review
avwait: Deserialised timecodes set after caps event now get correct framerate (3.66 KB, patch)
2017-11-14 16:28 UTC, Vivia Nikolaidou
none Details | Review
avwait: Deserialised timecodes set after caps event now get correct framerate (3.68 KB, patch)
2017-11-14 16:29 UTC, Vivia Nikolaidou
committed Details | Review

Description Vivia Nikolaidou 2017-11-14 16:16:41 UTC
See commit message
Comment 1 Vivia Nikolaidou 2017-11-14 16:16:54 UTC
Created attachment 363611 [details] [review]
avwait: Deserialised timecodes set after caps event now get correct framerate

A deserialised timecode has a framerate of 0/1 by default. That breaks
it when comparing the frames field with another timecode (incoming from
the frame). We were setting the framerate when receiving the caps event,
but not when setting the timecode in set_property, so it was broken for
timecodes set after the caps event.
Comment 2 Sebastian Dröge (slomo) 2017-11-14 16:20:10 UTC
Comment on attachment 363611 [details] [review]
avwait: Deserialised timecodes set after caps event now get correct framerate

Should also check for fps_n != 0 I guess, otherwise ok
Comment 3 Vivia Nikolaidou 2017-11-14 16:25:49 UTC
Created attachment 363613 [details] [review]
avwait: Deserialised timecodes set after caps event now get correct framerate

A deserialised timecode has a framerate of 0/1 by default. That breaks
it when comparing the frames field with another timecode (incoming from
the frame). We were setting the framerate when receiving the caps event,
but not when setting the timecode in set_property, so it was broken for
timecodes set after the caps event.

Also checking if the fps_n we got from the caps event is != 0 before
setting it - also at the caps event.
Comment 4 Sebastian Dröge (slomo) 2017-11-14 16:27:09 UTC
Review of attachment 363613 [details] [review]:

::: gst/timecode/gstavwait.c
@@ +595,3 @@
         self->tc->config.fps_d = self->vinfo.fps_d;
       }
+      if (self->end_tc && self->end_tc->config.fps_n == 0 && self->vinfo.fps_n) {

Make this also != 0, then push
Comment 5 Vivia Nikolaidou 2017-11-14 16:28:04 UTC
Created attachment 363614 [details] [review]
avwait: Deserialised timecodes set after caps event now get correct framerate

A deserialised timecode has a framerate of 0/1 by default. That breaks
it when comparing the frames field with another timecode (incoming from
the frame). We were setting the framerate when receiving the caps event,
but not when setting the timecode in set_property, so it was broken for
timecodes set after the caps event.

Also checking if the fps_n we got from the caps event is != 0 before
setting it - also at the caps event.
Comment 6 Vivia Nikolaidou 2017-11-14 16:29:27 UTC
Created attachment 363615 [details] [review]
avwait: Deserialised timecodes set after caps event now get correct framerate

A deserialised timecode has a framerate of 0/1 by default. That breaks
it when comparing the frames field with another timecode (incoming from
the frame). We were setting the framerate when receiving the caps event,
but not when setting the timecode in set_property, so it was broken for
timecodes set after the caps event.

Also checking if the fps_n we got from the caps event is != 0 before
setting it - also at the caps event.