mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 21:48:55 +00:00
give indication of why we segfault
Original commit message from CVS: give indication of why we segfault
This commit is contained in:
parent
df80b706a7
commit
7dc6d49cbb
2 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2004-12-29 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
|
* gst/ffmpegcolorspace/imgconvert.c:
|
||||||
|
give some indication of why we're segfaulting
|
||||||
|
|
||||||
2004-12-29 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
2004-12-29 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||||
|
|
||||||
* configure.ac:
|
* configure.ac:
|
||||||
|
|
|
@ -290,6 +290,7 @@ static PixFmtInfo pix_fmt_info[PIX_FMT_NB] = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* returns NULL if not found */
|
||||||
static PixFmtInfo *
|
static PixFmtInfo *
|
||||||
get_pix_fmt_info (enum PixelFormat format)
|
get_pix_fmt_info (enum PixelFormat format)
|
||||||
{
|
{
|
||||||
|
@ -300,6 +301,11 @@ get_pix_fmt_info (enum PixelFormat format)
|
||||||
return pix_fmt_info + i;
|
return pix_fmt_info + i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* since this doesn't get checked *anywhere*, we might as well warn
|
||||||
|
here if we return NULL so you have *some* idea what's going on */
|
||||||
|
g_warning ("Could not find info for pixel format %d, one segfault coming up",
|
||||||
|
format);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -405,7 +411,6 @@ avcodec_get_pix_fmt_loss (int dst_pix_fmt, int src_pix_fmt, int has_alpha)
|
||||||
|
|
||||||
/* compute loss */
|
/* compute loss */
|
||||||
loss = 0;
|
loss = 0;
|
||||||
pf = get_pix_fmt_info (dst_pix_fmt);
|
|
||||||
if (pf->depth < ps->depth ||
|
if (pf->depth < ps->depth ||
|
||||||
(dst_pix_fmt == PIX_FMT_RGB555 && src_pix_fmt == PIX_FMT_RGB565))
|
(dst_pix_fmt == PIX_FMT_RGB555 && src_pix_fmt == PIX_FMT_RGB565))
|
||||||
loss |= FF_LOSS_DEPTH;
|
loss |= FF_LOSS_DEPTH;
|
||||||
|
|
Loading…
Reference in a new issue