Skip to content

Commit

Permalink
Merge pull request #32 from dubhater/master
Browse files Browse the repository at this point in the history
applyrff: Copy props from first field's source frame
  • Loading branch information
dwbuiten authored Feb 19, 2017
2 parents 6021968 + a34442b commit 10f427b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/vs/applyrff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,13 @@ const VSFrameRef *VS_CC rffGetFrame(int n, int activationReason, void **instance
} else {
int dst_stride[3], srct_stride[3], srcb_stride[3];

f = vsapi->newVideoFrame(d->vi.format, d->vi.width, d->vi.height, NULL, core);
/*
* Copy properties from the first field's source frame.
* Some of them will be wrong for this frame, but ¯\_(ツ)_/¯.
*/
const VSFrameRef *prop_src = bottom_field < top_field ? sb : st;

f = vsapi->newVideoFrame(d->vi.format, d->vi.width, d->vi.height, prop_src, core);

for (i = 0; i < d->vi.format->numPlanes; i++) {
dst_stride[i] = vsapi->getStride(f, i);
Expand Down

0 comments on commit 10f427b

Please sign in to comment.