mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 11:32:38 +00:00
Merge branch 'master' into 0.11
This commit is contained in:
commit
198fa2571b
5 changed files with 11 additions and 13 deletions
|
@ -203,6 +203,10 @@ gst_ff_vid_caps_new (AVCodecContext * context, enum CodecID codec_id,
|
||||||
num = context->time_base.den / context->ticks_per_frame;
|
num = context->time_base.den / context->ticks_per_frame;
|
||||||
denom = context->time_base.num;
|
denom = context->time_base.num;
|
||||||
|
|
||||||
|
if (!denom) {
|
||||||
|
GST_LOG ("invalid framerate: %d/0, -> %d/1", num, num);
|
||||||
|
denom = 1;
|
||||||
|
}
|
||||||
if (gst_util_fraction_compare (num, denom, 1000, 1) > 0) {
|
if (gst_util_fraction_compare (num, denom, 1000, 1) > 0) {
|
||||||
GST_LOG ("excessive framerate: %d/%d, -> 0/1", num, denom);
|
GST_LOG ("excessive framerate: %d/%d, -> 0/1", num, denom);
|
||||||
num = 0;
|
num = 0;
|
||||||
|
|
|
@ -2322,7 +2322,7 @@ static void
|
||||||
gst_ffmpegdec_flush_pcache (GstFFMpegDec * ffmpegdec)
|
gst_ffmpegdec_flush_pcache (GstFFMpegDec * ffmpegdec)
|
||||||
{
|
{
|
||||||
if (ffmpegdec->pctx) {
|
if (ffmpegdec->pctx) {
|
||||||
gint res, size, bsize;
|
gint size, bsize;
|
||||||
guint8 *data;
|
guint8 *data;
|
||||||
guint8 bdata[FF_INPUT_BUFFER_PADDING_SIZE];
|
guint8 bdata[FF_INPUT_BUFFER_PADDING_SIZE];
|
||||||
|
|
||||||
|
@ -2331,7 +2331,7 @@ gst_ffmpegdec_flush_pcache (GstFFMpegDec * ffmpegdec)
|
||||||
|
|
||||||
/* parse some dummy data to work around some ffmpeg weirdness where it keeps
|
/* parse some dummy data to work around some ffmpeg weirdness where it keeps
|
||||||
* the previous pts around */
|
* the previous pts around */
|
||||||
res = av_parser_parse (ffmpegdec->pctx, ffmpegdec->context,
|
av_parser_parse (ffmpegdec->pctx, ffmpegdec->context,
|
||||||
&data, &size, bdata, bsize, -1, -1);
|
&data, &size, bdata, bsize, -1, -1);
|
||||||
ffmpegdec->pctx->pts = -1;
|
ffmpegdec->pctx->pts = -1;
|
||||||
ffmpegdec->pctx->dts = -1;
|
ffmpegdec->pctx->dts = -1;
|
||||||
|
@ -2347,11 +2347,9 @@ static gboolean
|
||||||
gst_ffmpegdec_sink_event (GstPad * pad, GstEvent * event)
|
gst_ffmpegdec_sink_event (GstPad * pad, GstEvent * event)
|
||||||
{
|
{
|
||||||
GstFFMpegDec *ffmpegdec;
|
GstFFMpegDec *ffmpegdec;
|
||||||
GstFFMpegDecClass *oclass;
|
|
||||||
gboolean ret = FALSE;
|
gboolean ret = FALSE;
|
||||||
|
|
||||||
ffmpegdec = (GstFFMpegDec *) gst_pad_get_parent (pad);
|
ffmpegdec = (GstFFMpegDec *) gst_pad_get_parent (pad);
|
||||||
oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
|
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (ffmpegdec, "Handling %s event",
|
GST_DEBUG_OBJECT (ffmpegdec, "Handling %s event",
|
||||||
GST_EVENT_TYPE_NAME (event));
|
GST_EVENT_TYPE_NAME (event));
|
||||||
|
|
|
@ -668,14 +668,12 @@ static gboolean
|
||||||
gst_ffmpegdemux_src_event (GstPad * pad, GstEvent * event)
|
gst_ffmpegdemux_src_event (GstPad * pad, GstEvent * event)
|
||||||
{
|
{
|
||||||
GstFFMpegDemux *demux;
|
GstFFMpegDemux *demux;
|
||||||
AVStream *avstream;
|
|
||||||
GstFFStream *stream;
|
GstFFStream *stream;
|
||||||
gboolean res = TRUE;
|
gboolean res = TRUE;
|
||||||
|
|
||||||
if (!(stream = gst_pad_get_element_private (pad)))
|
if (!(stream = gst_pad_get_element_private (pad)))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
avstream = stream->avstream;
|
|
||||||
demux = (GstFFMpegDemux *) gst_pad_get_parent (pad);
|
demux = (GstFFMpegDemux *) gst_pad_get_parent (pad);
|
||||||
|
|
||||||
switch (GST_EVENT_TYPE (event)) {
|
switch (GST_EVENT_TYPE (event)) {
|
||||||
|
@ -1982,8 +1980,10 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
|
||||||
!strcmp (in_plugin->name, "yuv4mpegpipe") ||
|
!strcmp (in_plugin->name, "yuv4mpegpipe") ||
|
||||||
!strcmp (in_plugin->name, "mpc") || !strcmp (in_plugin->name, "gif"))
|
!strcmp (in_plugin->name, "mpc") || !strcmp (in_plugin->name, "gif"))
|
||||||
rank = GST_RANK_MARGINAL;
|
rank = GST_RANK_MARGINAL;
|
||||||
else
|
else {
|
||||||
rank = GST_RANK_NONE;
|
GST_DEBUG ("ignoring %s", in_plugin->name);
|
||||||
|
goto next;
|
||||||
|
}
|
||||||
|
|
||||||
p = name = g_strdup (in_plugin->name);
|
p = name = g_strdup (in_plugin->name);
|
||||||
while (*p) {
|
while (*p) {
|
||||||
|
|
|
@ -605,12 +605,11 @@ gst_post_proc_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec)
|
const GValue * value, GParamSpec * pspec)
|
||||||
{
|
{
|
||||||
GstPostProc *postproc = (GstPostProc *) object;
|
GstPostProc *postproc = (GstPostProc *) object;
|
||||||
gint quality;
|
|
||||||
gchar *args;
|
gchar *args;
|
||||||
|
|
||||||
switch (prop_id) {
|
switch (prop_id) {
|
||||||
case PROP_QUALITY:
|
case PROP_QUALITY:
|
||||||
quality = g_value_get_uint (value);
|
postproc->quality = g_value_get_uint (value);
|
||||||
break;
|
break;
|
||||||
case PROP_AUTOQ:
|
case PROP_AUTOQ:
|
||||||
postproc->autoq = g_value_get_boolean (value);
|
postproc->autoq = g_value_get_boolean (value);
|
||||||
|
|
|
@ -313,7 +313,6 @@ static GstCaps *
|
||||||
gst_ffmpegscale_transform_caps (GstBaseTransform * trans,
|
gst_ffmpegscale_transform_caps (GstBaseTransform * trans,
|
||||||
GstPadDirection direction, GstCaps * caps)
|
GstPadDirection direction, GstCaps * caps)
|
||||||
{
|
{
|
||||||
GstFFMpegScale *scale;
|
|
||||||
GstCaps *ret;
|
GstCaps *ret;
|
||||||
GstStructure *structure;
|
GstStructure *structure;
|
||||||
const GValue *par;
|
const GValue *par;
|
||||||
|
@ -321,8 +320,6 @@ gst_ffmpegscale_transform_caps (GstBaseTransform * trans,
|
||||||
/* this function is always called with a simple caps */
|
/* this function is always called with a simple caps */
|
||||||
g_return_val_if_fail (GST_CAPS_IS_SIMPLE (caps), NULL);
|
g_return_val_if_fail (GST_CAPS_IS_SIMPLE (caps), NULL);
|
||||||
|
|
||||||
scale = GST_FFMPEGSCALE (trans);
|
|
||||||
|
|
||||||
structure = gst_caps_get_structure (caps, 0);
|
structure = gst_caps_get_structure (caps, 0);
|
||||||
|
|
||||||
ret = gst_caps_copy (caps);
|
ret = gst_caps_copy (caps);
|
||||||
|
|
Loading…
Reference in a new issue