[Bug 681111] New: Bad librtmp return value treatment

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Fri Aug 3 01:31:35 PDT 2012


https://bugzilla.gnome.org/show_bug.cgi?id=681111
  GStreamer | gst-plugins-bad | git

           Summary: Bad librtmp return value treatment
    Classification: Platform
           Product: GStreamer
           Version: git
        OS/Version: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-bad
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: dregade at viewsurf.com
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


Created an attachment (id=220208)
 View: https://bugzilla.gnome.org/attachment.cgi?id=220208
 Review: https://bugzilla.gnome.org/review?bug=681111&attachment=220208

rtmpsink librtmp return value

In ext/rtmp/gstrtmpsink.c around line 244:

  if (!RTMP_Write (sink->rtmp, (char *) map.data, map.size))
    goto write_failed;


But RTMP_Write may return:
- 0 if packet is to small
- FALSE (0) on memory allocation error
- -1 if a packet failed to be sent
- bytes sent in all other cases

So -1 must be considered as an error and previous return value test should be:

  if (0 >= RTMP_Write (sink->rtmp, (char *) map.data, map.size))
    goto write_failed;

I attached a patch against commit:
955e50449e471e8431664f5f8db304ffeb79ae16

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list