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 789408 - gst-plugins-good: alaw-encode: Handled buffer mapping failure
gst-plugins-good: alaw-encode: Handled buffer mapping failure
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.12.3
Other All
: Normal minor
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-10-24 14:20 UTC by Ashish Kumar
Modified: 2018-05-07 16:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] gst-plugins-good: alaw-encode: Handled buffer mapping failure (1.52 KB, patch)
2017-10-24 14:21 UTC, Ashish Kumar
none Details | Review

Description Ashish Kumar 2017-10-24 14:20:18 UTC
Buffer mapping failure must be handled at below:-
File: gst-plugins-good-1.12.3/gst/law/alaw-encode.c
Function: gst_alaw_enc_handle_frame

...
  gst_buffer_map (buffer, &inmap, GST_MAP_READ);
  linear_data = (gint16 *) inmap.data;
  linear_size = inmap.size;

  alaw_size = linear_size / 2;

  outbuf = gst_audio_encoder_allocate_output_buffer (audioenc, alaw_size);

  g_assert (outbuf);

  gst_buffer_map (outbuf, &outmap, GST_MAP_WRITE);
  alaw_data = outmap.data;
...

Failure of gst_buffer_map must be handled.
Comment 1 Ashish Kumar 2017-10-24 14:21:46 UTC
Created attachment 362188 [details] [review]
[PATCH] gst-plugins-good: alaw-encode: Handled buffer mapping failure

Please review the patch attached to fix the issue and share your feedback.
Comment 2 Sebastian Dröge (slomo) 2018-05-07 16:06:49 UTC
See https://bugzilla.gnome.org/show_bug.cgi?id=789506#c2 . This can't fail here