[gstreamer-bugs] [Bug 540497] New: ffmpegcolorspace is returning wrong size

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Fri Jun 27 07:38:14 PDT 2008


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=540497

  GStreamer | gst-plugins-base | Ver: HEAD CVS
           Summary: ffmpegcolorspace is returning wrong size
           Product: GStreamer
           Version: HEAD CVS
          Platform: Other
        OS/Version: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-base
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: kapil at fluendo.com
         QAContact: gstreamer-bugs at lists.sourceforge.net
     GNOME version: 2.19/2.20
   GNOME milestone: Unspecified


Please describe the problem:
When I run an avi file it fails with errors mentioned. Basically
ffmpegcolorspace is returning lesser value then asked by the avidemux. 
The error is due to the condition in gstffmpegcolorspace.c

if (gst_structure_has_field (structure, "palette_data")) {
    *size -= 4 * 256;           /* = AVPALETTE_SIZE */
  }

wherein the palette is considered a part of buffer and hence its value is being
subtracted. Basically this is only true for pixel format = PIX_FMT_PAL8, as
mentioned in gstffmpegcodecmap.c. But in my case the pixel format is 
PIX_FMT_BGR24 and palette data is not added here, but still its being
subtracted. So I would like to suggest to add a condition 

 if (gst_structure_has_field (structure, "palette_data") && ctx->pix_fmt ==
PIX_FMT_PAL8) {
    *size -= 4 * 256;           /* = AVPALETTE_SIZE */
  }


Steps to reproduce:
1.  GST_DEBUG=2 gst-launch-0.10 filesrc location=waiting.avi ! avidemux !
decodebin ! ffmpegcolorspace ! videoscale ! ximagesink
2.    


Actual results:
** (gst-launch-0.10:24385): WARNING **: ffmpegcsp0: size 11520 is not a
multiple of unit size 10496
0:00:00.312994206 24385  0x81462d0 WARN         basetransform
gstbasetransform.c:1533:gst_base_transform_handle_buffer:<ffmpegcsp0> error:
subclass did not specify output size
0:00:00.313079976 24385  0x81462d0 WARN         basetransform
gstbasetransform.c:1533:gst_base_transform_handle_buffer:<ffmpegcsp0> error:
subclass did not specify output size
ERROR: from element /pipeline0/ffmpegcsp0: subclass did not specify output size


Expected results:
ffmpegcolorspace should allocate 11520

Does this happen every time?
yes

Other information:


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=540497.




More information about the Gstreamer-bugs mailing list