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 795327 - "rfbsrc" linked to "videorate" causes error "invalid buffer size 4096 < 4196352"
"rfbsrc" linked to "videorate" causes error "invalid buffer size 4096 < 4196352"
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.14.0
Other Windows
: Normal normal
: 1.14.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-04-17 10:00 UTC by Mikhaylo
Modified: 2018-05-04 08:17 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mikhaylo 2018-04-17 10:00:23 UTC
The pipeline

gst-launch-1.0.exe rfbsrc host="localhost" port=5900 password=pass ! videorate ! video/x-raw,framerate=10/1 ! videoconvert ! jpegenc ! fakesink

not working due some issues between rfbsrc and videorate . 
The pipeline works if I remove "videorate" with caps or just replace rfbsrc by videotestsrc

Debug details are below:

D:\gstreamer\1.0\x86_64\bin>gst-launch-1.0.exe rfbsrc host="localhost" port=5900 password=pass ! videorate ! video/x-raw,framerate=10/1 ! videoconvert ! jpegenc ! fakesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
0:00:00.106214535 Setti139n8g0 pipeline to PLAYING ...
 00000000051ABC40 New clock: GstSystemClock
FIXME                default gstutils.c:3963:gst_pad_create_stream_id_internal:<rfbsrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:00.155560157 13980 00000000051ABC40 FIXME                default gstutils.c:3963:gst_pad_create_stream_id_internal:<rfbsrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:00.298831545 13980 00000000051ABC40 ERROR                default video-frame.c:175:gst_video_frame_map_id: invalid buffer size 4096 < 4196352
0:00:00.305438688 13980 00000000051ABC40 WARN                 jpegenc gstjpegenc.c:550:gst_jpegenc_handle_frame:<jpegenc0> invalid frame received
0:00:00.316200844 13980 00000000051ABC40 ERROR           videoencoder gstvideoencoder.c:2345:gst_video_encoder_finish_frame:<jpegenc0> Output state was not configured
0:00:00.323157399 13980 00000000051ABC40 WARN                 basesrc gstbasesrc.c:3055:gst_base_src_loop:<rfbsrc0> error: Internal data stream error.
0:00:00.326024094 13980 00000000051ABC40 WARN                 basesrc gstbasesrc.c:3055:gst_base_src_loop:<rfbsrc0> error: streaming stopped, reason error (-5)
0:00:00.329748031 ERROR: from element /GstPipeline:pipeline0/GstRfbSrc:rfbsrc0: Internal data stream error.
13980Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstRfbSrc:rfbsrc0:
streaming stopped, reason error (-5)
 0000E0000051ABC40 xecution ended after 0:00:00E.227940639
RROR   Setting pipeline to PAUSED ...
             default video-frame.c:175:gst_video_frame_map_id:Setting pipeline to READY ...
 invalid buffer size 4096 < 4196352
0:00:00.341547712 13980 00000000051ABC40 WARN                 jpegenc gstjpegenc.c:550:gst_jpegenc_handle_frame:<jpegenc0> invalid frame received
0:00:00.344335867 13980 00000000051ABC40 ERROR           videoencoder gstvideoencoder.c:2345:gst_video_encoder_finish_frame:<jpegenc0> Output state was not configured
Setting pipeline to NULL ...
Freeing pipeline ...
Comment 1 Nicolas Dufresne (ndufresne) 2018-04-25 17:46:17 UTC
Thanks for the report, that's a really strange one.
Comment 2 Nicolas Dufresne (ndufresne) 2018-04-25 17:59:08 UTC
Might have a hint, if you instead rfbsrc ! identity drop-allocation=1 ! videorate ! ... it works.
Comment 3 Nicolas Dufresne (ndufresne) 2018-04-25 19:09:19 UTC
commit ede8b1c8ce90c18be548d9ec88ba8c53d14b5043 (HEAD -> master, origin/master, origin/HEAD)
Author: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Date:   Wed Apr 25 15:05:38 2018 -0400

    rfbsrc: Fix decide_allocation to support NULL pool
    
    We were assuming that NULL pool meant that downstream didn't reply.
    Update the pool index 0 instead of adding at the end. Otherwise we ended
    up letting basesrc decide, which would pick the blocksize as a size
    (4096) instead of the image size.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=795327

This is good candidate for backport, let me know if that would be useful for you. I've also added support for applevncserver while at it.


commit 5d1efe7f556f4a47a2a80d19bc73ea1875fbcc73
Author: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Date:   Wed Apr 25 13:36:01 2018 -0400

    rfbsrc: Fix support for applevncserver
    
    This server uses an unknown 003.889 protocol version. This patch fixes
    the version validation in order to simply fallback to 3.3 as suggested
    by the spec.
Comment 4 Mikhaylo 2018-05-04 05:45:57 UTC
Thank you for taking care about this!
Yes, backport would be very usefull
Comment 5 Sebastian Dröge (slomo) 2018-05-04 08:17:57 UTC
Already backported to 1.14 and will be part of 1.14.1