- output_plane(&ctx->planes[0], ctx->buf_sel, ctx->frame.data[0], ctx->frame.linesize[0]);
- output_plane(&ctx->planes[1], ctx->buf_sel, ctx->frame.data[1], ctx->frame.linesize[1]);
- output_plane(&ctx->planes[2], ctx->buf_sel, ctx->frame.data[2], ctx->frame.linesize[2]);
-
- *data_size = sizeof(AVFrame);
+ output_plane(&ctx->planes[0], ctx->buf_sel,
+ ctx->frame.data[0], ctx->frame.linesize[0],
+ avctx->height);
+ output_plane(&ctx->planes[1], ctx->buf_sel,
+ ctx->frame.data[1], ctx->frame.linesize[1],
+ (avctx->height + 3) >> 2);
+ output_plane(&ctx->planes[2], ctx->buf_sel,
+ ctx->frame.data[2], ctx->frame.linesize[2],
+ (avctx->height + 3) >> 2);
+
+ *got_frame = 1;