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 601707 - Movie aspect ratio errors when streaming RTSP
Movie aspect ratio errors when streaming RTSP
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: GStreamer backend
2.27.x
Other Linux
: Normal normal
: ---
Assigned To: Maintainer alias for GStreamer component of Totem
Maintainer alias for GStreamer component of Totem
Depends on:
Blocks:
 
 
Reported: 2009-11-12 15:24 UTC by Bastien Nocera
Modified: 2009-11-13 12:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix movie aspect ratio errors with slow streams (1.32 KB, patch)
2009-11-13 12:52 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2009-11-12 15:24:20 UTC
$ ./totem rtsp://test:test@bastien-noceras-macbook-air.local./untitled.sdp
** Message: no file info
** Message: bvw->priv->video_width 384 bvw->priv->video_height 240 movie_par_n 0, movie_par_d 0 disp_par_n 1 disp_par_d 1

(totem:7497): GStreamer-CRITICAL **: gst_value_set_fraction: assertion `denominator != 0' failed

** (totem:7497): CRITICAL **: gst_video_calculate_display_ratio: assertion `num > 0' failed
** Message: bvw->priv->video_width 384 bvw->priv->video_height 240 movie_par_n 0, movie_par_d 0 disp_par_n 1 disp_par_d 1

(totem:7497): GStreamer-CRITICAL **: gst_value_set_fraction: assertion `denominator != 0' failed

** (totem:7497): CRITICAL **: gst_video_calculate_display_ratio: assertion `num > 0' failed
** Message: caps_set() called, square pixels
** Message: caps_set() called, square pixels
** Message: bvw->priv->video_width 192 bvw->priv->video_height 242 movie_par_n 1, movie_par_d 1 disp_par_n 1 disp_par_d 1
** Message: bvw->priv->video_width 192 bvw->priv->video_height 242 movie_par_n 1, movie_par_d 1 disp_par_n 1 disp_par_d 1

Maybe we should default to movie_par_n = movie_par_d = 1?
Comment 1 Jan Schmidt 2009-11-12 19:38:08 UTC
I haven't checked exactly what is happening. From what you said on IRC, my guess is that because RTSP is a live source, the pipeline goes to playing before it is pre-rolled, which leads to this case.

Since it has to be that if you don't have caps, neither does the sink - that implies that it doesn't matter... there's nothing to be put on the screen yet anyway.

I say use 1/1 - it will be corrected shortly afterward when the pipeline prerolls, or if possible, defer whatever is causing the check until the pipeline actually does preroll (either by checking the bus messages, or waiting until you get caps)
Comment 2 Jan Schmidt 2009-11-13 01:47:41 UTC
Yep, initialising the PAR to 1:1 does the trick nicely (I managed to encounter this with a DVD, when the disc takes a while to spin up):

diff --git a/src/backend/bacon-video-widget-gst-0.10.c b/src/backend/bacon-video-widget-gst-0.10.c
index 6110d32..51644b8 100644
--- a/src/backend/bacon-video-widget-gst-0.10.c
+++ b/src/backend/bacon-video-widget-gst-0.10.c
@@ -1260,6 +1260,7 @@ bacon_video_widget_init (BaconVideoWidget * bvw)
   priv->videotags = NULL;
   priv->zoom = 1.0;
   priv->volume = -1.0;
+  priv->movie_par_n = priv->movie_par_d = 1;
 
   priv->lock = g_mutex_new ();
Comment 3 Bastien Nocera 2009-11-13 12:52:43 UTC
Created attachment 147658 [details] [review]
Fix movie aspect ratio errors with slow streams

When getting media size before the pipeline is pre-rolled,
we'd be getting errors because we're trying to set the aspect ratio
with a zero denominator.
Comment 4 Bastien Nocera 2009-11-13 12:54:55 UTC
Attachment 147658 [details] pushed as 2eb6b4b - Fix movie aspect ratio errors with slow streams