Original commit message from CVS:
* gst/ffmpegcolorspace/gstffmpegcolorspace.c:
(gst_ffmpegcsp_get_unit_size):
Return FALSE instead of returning a random false unit
size when the format isn't known/supported (even if
this shouldn't happen under normal circumstances).
+2006-08-30 Tim-Philipp Müller <tim at centricular dot net>
+
+ * gst/ffmpegcolorspace/gstffmpegcolorspace.c:
+ (gst_ffmpegcsp_get_unit_size):
+ Return FALSE instead of returning a random false unit
+ size when the format isn't known/supported (even if
+ this shouldn't happen under normal circumstances).
+
2006-08-29 Wim Taymans <wim@fluendo.com>
Patch by: Tim-Philipp Müller <tim at centricular dot net>
GstFFMpegCsp *space = NULL;
GstStructure *structure = NULL;
AVCodecContext *ctx = NULL;
+ gboolean ret = TRUE;
gint width, height;
g_assert (size);
g_assert (ctx != NULL);
+ ctx->pix_fmt = PIX_FMT_NB;
+
gst_ffmpegcsp_caps_with_codectype (CODEC_TYPE_VIDEO, caps, ctx);
+ if (G_UNLIKELY (ctx->pix_fmt == PIX_FMT_NB)) {
+ ret = FALSE;
+ goto beach;
+ }
+
*size = avpicture_get_size (ctx->pix_fmt, width, height);
/* ffmpeg frames have the palette after the frame data, whereas
*size -= 4 * 256; /* = AVPALETTE_SIZE */
}
+beach:
+
if (ctx->palctrl)
av_free (ctx->palctrl);
av_free (ctx);
- return TRUE;
+ return ret;
}
#if 0