AppSrc resolution restrictions

Nicolas Dufresne nicolas at ndufresne.ca
Tue Nov 19 01:27:44 UTC 2019


Le lundi 18 novembre 2019 à 23:18 +0300, Ilya Aleshkov a écrit :
> Hi,
> 
> I am trying to feed a 658x492 frame to AppSrc element.
> And I always get the same error: default video-frame.c:175:gst_video_frame_map_id: invalid buffer size 971208 < 972192
> It seems that AppSrc element just can't adopt this particular resolution - 658x492 (and some others too).
> It's relatively easy to fix by slightly changing the resolution (660x490). I wonder why.
> How to deal with it in proper way? I would not want to crop/resize my frames.

You forgot to mention which pixel formats. GStreamer will assume some
default alignments which do make sense for memory access. If you don't
follow the default alignment then add GstVideMeta on the buffer to
specify. This can be done using gst_buffer_add_video_meta_full() prior
to pushing.

Note that some software element don't fully check their alignments and
will just crash in some cases. Feel free to fix as needed.

Nicolas



More information about the gstreamer-devel mailing list