If output size == input size, just pass through buffer
Original commit message from CVS: If output size == input size, just pass through buffer
This commit is contained in:
parent
c5d1baf05a
commit
4f5c32f140
@ -266,6 +266,10 @@ GST_DEBUG(0,"size=%ld from=%dx%d to=%dx%d newsize=%d",
|
|||||||
videoscale->targetwidth, videoscale->targetheight,
|
videoscale->targetwidth, videoscale->targetheight,
|
||||||
videoscale->targetwidth*videoscale->targetheight + videoscale->targetwidth*videoscale->targetheight/2);
|
videoscale->targetwidth*videoscale->targetheight + videoscale->targetwidth*videoscale->targetheight/2);
|
||||||
|
|
||||||
|
if(videoscale->targetwidth==videoscale->width &&
|
||||||
|
videoscale->targetheight==videoscale->height){
|
||||||
|
gst_pad_push(videoscale->srcpad, buf);
|
||||||
|
}else{
|
||||||
outbuf = gst_buffer_new();
|
outbuf = gst_buffer_new();
|
||||||
/* XXX this is wrong for anything but I420 */
|
/* XXX this is wrong for anything but I420 */
|
||||||
GST_BUFFER_SIZE(outbuf) = videoscale->targetwidth*videoscale->targetheight +
|
GST_BUFFER_SIZE(outbuf) = videoscale->targetwidth*videoscale->targetheight +
|
||||||
@ -282,6 +286,7 @@ GST_DEBUG(0,"size=%ld from=%dx%d to=%dx%d newsize=%d",
|
|||||||
gst_pad_push(videoscale->srcpad, outbuf);
|
gst_pad_push(videoscale->srcpad, outbuf);
|
||||||
|
|
||||||
gst_buffer_unref(buf);
|
gst_buffer_unref(buf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user