mysterious .jpg vs .png playback behavior

Sergei Vorobyov sergei.vorobyov at facilitylabs.com
Tue Apr 3 04:40:35 PDT 2012


Greetins!

I am stuck with the following inexplicable GStreamer playback
behavior. Maybe someone has a clue?

1. Both

gst-launch filesrc location=file.png ! decodebin2 ! imagefreeze !
ffmpegcolorspace ! xvimagesink

and

gst-launch filesrc location=file.jpg ! decodebin2 ! imagefreeze !
ffmpegcolorspace ! xvimagesink

work fine, and I can even swap imagefreeze ! ffmpegcolorspace.

2. However, when I turn it into the C-code (omitting declarations and checks):

  src = gst_element_factory_make ("filesrc", "source");
  g_object_set (src, "location", fname, NULL);
  dec = gst_element_factory_make ("decodebin2", "decoder");
  img_freeze = gst_element_factory_make ("imagefreeze", "image_freeze");
  conv = gst_element_factory_make ("ffmpegcolorspace", "ffmpeg-colorspace");
  sink = gst_element_factory_make ("ximagesink", "sink");

  gst_bin_add_many (GST_BIN (pipeline),
		      src,
		      dec,
		      conv,
		      img_freeze,
		      sink, NULL);

  gst_element_link (src, dec);

  g_signal_connect (dec, "pad-added", G_CALLBACK (on_pad_added),
conv); // dynamic pad link

  gst_element_link_many (conv, img_freeze, sink, NULL);

Then it works as expected if fname is a .png file, but hangs if fname
is a .jpg file

I caught all messages on the bus, as well as in the callback in the //
dynamic pad link above.

It just hangs with no reports on .jpg files

Any ideas?

Many thanks!


More information about the gstreamer-devel mailing list